suchen
HeimWeb-FrontendHTML-TutorialHTML-geordnete Liste

HTML-geordnete Liste

Sep 04, 2024 pm 04:43 PM
htmlhtml5HTML TutorialHTML PropertiesHTML tags

In this section, we will learn how to implement Ordered Lists in HTML. How to describe or display an ordered list? It’s very simple and easy; they are used to describe the list of information in the content. And another technique is a single list can have multiple lists elements on them.

The lists in HTML can be classified into three types, they are:

  1. Ordered List
  2. Unordered list
  3. Definition List

In this article, we shall go through the ordered list specification with an example. The ordered list defines the specific ordered information when a list is created; for instance, it shows ordinate information or numbering the information.

Syntax of Ordered List

Ordered list is created using a tag named

    element and ends with
tag.

HTML-geordnete Liste

Examples of Ordered List

Let us see some example mentioned below:

Example #1



<title>HTML Ordered List</title>


<p><strong>There are 6 different airlines:</strong></p>
<ol type="1">
<li>Jet Blue Airlines</li>
<li>Frontier Airlines</li>
<li>South West Airlines</li>
<li> Spirit Airlines</li>
<li> United Airlines</li>
<li>America Airlines</li> </ol>

Output:

This will give you the result like

HTML-geordnete Liste

Example #2

Ordered List with colors. In the following example, we have used a certain counter property, defines the automatic counting list-items in the

  • . It is just an internal variable of CSS to enable counting functions.
    
    
    <title>HTML Ordered List with colors</title>
    
    
    <style>
    ol li {
    counter-increment: list;
    list-style-type: none;
    position: relative;
    }
    ol li:before {
    color: #ff0000;
    content: counter(list) ".";
    left: -22px;
    position: absolute;
    text-align: center;
    width: 24px;
    }</style>
    <ol>
    <li><span> Norway is a Scandinavian Country</span></li>
    <li><span>Oslo is the capital city</span></li>
    <li><span>norway is known for its beauty , hiking, fishing</span></li>
    <li><span>Ranked among the toppest country in europe</span></li>
    </ol><br>
    

    Output:
    HTML-geordnete Liste

    Types of Attributes for HTML Ordered List

    To represent the ordered list, there are five important types of attributes for this tag. As the HTML

      tag represents the list of items in the ordered list, they can be either in alphanumeric, numeric or simply alphabetical order, provided order is the primary thing. Here are the possible attributes of the Ordered list:

      1. The Type attribute

      This attribute gives the type of numbering to be used in the list.

    • type =’a’ – Gives alphabetical order
    • type =’A’- Gives Upper case Alphabetical order
    • type =’i’ – Gives Roman number lower case
    • type =’ I’- Gives Upper case Roman numbers

    These type of numbering are mentioned below:

    I.  Attribute type=’a.’

    To make a list in alphabetical lower case, this type is used. The following example shows the ordered list in the lowercase and made it in italic.

    Example:

    
    
    <title>HTML Ordered List types</title>
    
    
    <style>
    ol li span {
    font-weight: normal;
    }
    </style>
    <p>Did you know that:</p>
    <p>Skills required to become a data Scientist</p>
    <ol type="a">
    <li><span><i> steps</i></span></li>
    <li><span><b>There should be a prior knowledge in SAS and R programming.</b></span></li>
    <li>
    <span><b>They should have a strong calibre in creativity and analysis</b></span><b></b>
    </li>
    </ol>
    
    

    Output:

    HTML-geordnete Liste

     II. Attribute type=’A.’

    An ordered list can have an attribute type of alphabet lowercase. The below example demonstrates how to use this attribute in the list structure and also how to make the letters in bold. To have the ordered list in bold, it is to be declared using

    Example:

    
    
    <title> Example for Nested list</title>
    
    
    <p> State capitals of the united States</p>
    <style>
    ol {
    font-weight:bolder;
    }
    ol li span {
    font-weight: normal;
    }
    </style>
    <ol type="A">
    <li> <span>Alabama
    <ul>
    <li>Montgomery</li>
    </ul>
    </span>
    </li>
    <li>
    <span>Arizona
    <ul>
    <li>Phoenix</li>
    </ul>
    </span>
    </li>
    <li> <span>California
    <ul>
    <li>Sacramento</li>
    </ul>
    </span>
    </li>
    <li> <span>New jersey
    <ul>
    <li>Trenton</li>
    </ul>
    </span>
    </li>
    <li>
    <span>Washington
    <ul>
    <li>Olympia</li>
    </ul></span>
    </li>
    <li> <span>Pennsylvannia
    <ul>
    </ul></span> </li>
    <li>Harisburg</li>
    </ol>
  • Output:

    HTML-geordnete Liste

    III. Attribute type=’i.’

    This functionality indicates lower case roman letters.

    Example:

    
    
    <title>HTML Ordered List types</title>
    
    
    <p> EDUCBA HTML List Tutorial:</p>
    <ol>
    <li value="4">Ordered list</li>
    <li>unordered list</li>
    <li>Definition list
    <ol type="i">
    <li> <i>Introduction to list </i>
    </li>
    <li><i>Syntax a List</i></li>
    <li>
    <i> Types with an example</i>
    </li>
    </ol>
    </li>
    <li>Snapshots</li>
    </ol>
    

    Output:

    HTML-geordnete Liste

    IV. Attribute type=’ I.’

    This functionality gives the output in Upper Roman Numerals.

    Example:

    
    
    <title>HTML Ordered List Demo</title>
    
    
    <h2> List of Vegetables
    <ol type="I">
    <li>Carrot</li>
    <li> Radish</li>
    <li> Sweet Corn</li>
    </ol>
    <ol>
    <li>Fruits List
    <ol type="a">
    <li>Pomegrante</li>
    <li>Bananas</li>
    <li>Pears</li>
    </ol>
    </li>
    
    </ol>
    </h2>

    Output:

    HTML-geordnete Liste

    2. The Start Attribute

    The start attribute defines the start value for the ordered list numbers. You can start with any number from the beginning, not just from the default number ‘1’. Example: start=6. It’s been used now in HTML5.

    Example:

    In the following example, I have used style type to upper_alpha along with a start from =3; therefore, the output is shown from ‘C’.

    
    
    <title> Example for Nested list</title>
    
    
    <p> RICHEST COUNTRIES IN THE WORLD</p>
    <style>
    ol { list-style-type: upper-alpha;
    font-weight:bolder;
    }
    ol li span {
    font-weight: normal;}
    </style>
    <ol start="3">
    <li>Quatar known for his oil and petrochemical reserves</li>
    <li>Norway known for the beauty of nature with petroleum producer</li>
    <li>Singapore with global trade center</li>
    </ol>
    
    

    Output: 

    HTML-geordnete Liste

    3. The Reverse Attribute

    This is the new attribute introduced in HTML5, which indicates the items are displayed in the reverse order in the web browsers. To use,

      it’s a Boolean attribute taking any value to it to reverse the counter. Declared
        in the
          tag.

          Example:

          
          
          <title>HTML Ordered List</title>
          
          
          <h2 id="How-to-do-Balle-Technique">How to do Balle Technique</h2>
          <ol>
          <li>Turn out</li>
          <li>Alignment</li>
          <li>Pointed Toes</li>
          </ol>
          <hr>
          <h2 id="Balle-Steps"> Balle Steps</h2>
          <ol reversed="True">
          <li>Seven Movements</li>
          <li>Plier</li>
          <li>Etendre </li>
          <li>Glisser</li>
          <li>Eliever</li>
          </ol>
          
          

          Output:

          HTML-geordnete Liste

          結論

          因此,我把有序列表做了什麼總結到最後,幾乎所有瀏覽器都支援它。當然,您可以在 HTML 標籤元素中建立任意數量的清單;在本文中,我們僅關注選定的範例以了解基本實作。因此,學習這個主題可能不是最困難的工作,因為

          1. 這裡使用的標籤非常容易記住。

    Das obige ist der detaillierte Inhalt vonHTML-geordnete Liste. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

    Stellungnahme
    Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
    Von Text zu Websites: Die Kraft von HTMLVon Text zu Websites: Die Kraft von HTMLApr 13, 2025 am 12:07 AM

    HTML ist eine Sprache, mit der Webseiten erstellt, die Webseitenstruktur und -inhalt über Tags und Attribute definiert werden. 1) HTML organisiert die Dokumentstruktur über Tags, wie z. B.. 2) Der Browser analysiert HTML, um das DOM zu erstellen und die Webseite zu rendern. 3) Neue Merkmale von HTML5, wie z. B. Multimedia -Funktionen. 4) Zu den häufigen Fehlern gehören nicht abgestimmte Bezeichnungen und nicht geeignete Attributwerte. 5) Die Optimierungsvorschläge umfassen die Verwendung semantischer Tags und die Reduzierung der Dateigröße.

    HTML, CSS und JavaScript verstehen: Ein AnfängerhandbuchHTML, CSS und JavaScript verstehen: Ein AnfängerhandbuchApr 12, 2025 am 12:02 AM

    WebdevelopmentRelieSonHtml, CSS und JavaScript: 1) HtmlStructuresContent, 2) CSSstylesit und 3) JavaScriptaddssinteraktivität, Bildung von TheBasisofModerernwebexperiences.

    Die Rolle von HTML: Strukturierung von WebinhaltenDie Rolle von HTML: Strukturierung von WebinhaltenApr 11, 2025 am 12:12 AM

    Die Rolle von HTML besteht darin, die Struktur und den Inhalt einer Webseite durch Tags und Attribute zu definieren. 1. HTML organisiert Inhalte über Tags wie das Lesen und Verständnis. 2. Verwenden Sie semantische Tags wie usw., um die Zugänglichkeit und SEO zu verbessern. 3. Optimierung des HTML -Codes kann die Ladegeschwindigkeit und die Benutzererfahrung der Webseite verbessern.

    HTML und Code: Ein genauerer Blick auf die TerminologieHTML und Code: Ein genauerer Blick auf die TerminologieApr 10, 2025 am 09:28 AM

    HtmlisaspecifictypeofcodeFocusedonstructuringuringwebcontent, während "Code" breitincludesluages ​​-ähnlichjavaScriptandpythonforfunctionality.1) htmldefineswebpageStructureStags.2) "Code" cometesaWiNrangeOfLanguagesForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForfirsInsForfunctionNacts

    HTML, CSS und JavaScript: Wesentliche Tools für WebentwicklerHTML, CSS und JavaScript: Wesentliche Tools für WebentwicklerApr 09, 2025 am 12:12 AM

    HTML, CSS und JavaScript sind die drei Säulen der Webentwicklung. 1. HTML definiert die Webseitenstruktur und verwendet Tags wie z.

    Die Rollen von HTML, CSS und JavaScript: KernverantwortungDie Rollen von HTML, CSS und JavaScript: KernverantwortungApr 08, 2025 pm 07:05 PM

    HTML definiert die Webstruktur, CSS ist für Stil und Layout verantwortlich, und JavaScript ergibt eine dynamische Interaktion. Die drei erfüllen ihre Aufgaben in der Webentwicklung und erstellen gemeinsam eine farbenfrohe Website.

    Ist HTML für Anfänger leicht zu lernen?Ist HTML für Anfänger leicht zu lernen?Apr 07, 2025 am 12:11 AM

    HTML ist für Anfänger geeignet, da es einfach und leicht zu lernen ist und schnell Ergebnisse sehen kann. 1) Die Lernkurve von HTML ist glatt und leicht zu beginnen. 2) Beherrschen Sie einfach die grundlegenden Tags, um Webseiten zu erstellen. 3) hohe Flexibilität und kann in Kombination mit CSS und JavaScript verwendet werden. 4) Reiche Lernressourcen und moderne Tools unterstützen den Lernprozess.

    Was ist ein Beispiel für ein Start -Tag in HTML?Was ist ein Beispiel für ein Start -Tag in HTML?Apr 06, 2025 am 12:04 AM

    AnexampleofaTartingTaginHtmlis, die, die starttagsaresesinginhtmlastheyinitiateElements, definetheirtypes, andarecrucialForstructuringwebpages und -konstruktionsthedoms.

    See all articles

    Heiße KI -Werkzeuge

    Undresser.AI Undress

    Undresser.AI Undress

    KI-gestützte App zum Erstellen realistischer Aktfotos

    AI Clothes Remover

    AI Clothes Remover

    Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

    Undress AI Tool

    Undress AI Tool

    Ausziehbilder kostenlos

    Clothoff.io

    Clothoff.io

    KI-Kleiderentferner

    AI Hentai Generator

    AI Hentai Generator

    Erstellen Sie kostenlos Ai Hentai.

    Heißer Artikel

    R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)
    3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Beste grafische Einstellungen
    3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können
    3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
    WWE 2K25: Wie man alles in Myrise freischaltet
    4 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌

    Heiße Werkzeuge

    MantisBT

    MantisBT

    Mantis ist ein einfach zu implementierendes webbasiertes Tool zur Fehlerverfolgung, das die Fehlerverfolgung von Produkten unterstützen soll. Es erfordert PHP, MySQL und einen Webserver. Schauen Sie sich unsere Demo- und Hosting-Services an.

    MinGW – Minimalistisches GNU für Windows

    MinGW – Minimalistisches GNU für Windows

    Dieses Projekt wird derzeit auf osdn.net/projects/mingw migriert. Sie können uns dort weiterhin folgen. MinGW: Eine native Windows-Portierung der GNU Compiler Collection (GCC), frei verteilbare Importbibliotheken und Header-Dateien zum Erstellen nativer Windows-Anwendungen, einschließlich Erweiterungen der MSVC-Laufzeit zur Unterstützung der C99-Funktionalität. Die gesamte MinGW-Software kann auf 64-Bit-Windows-Plattformen ausgeführt werden.

    ZendStudio 13.5.1 Mac

    ZendStudio 13.5.1 Mac

    Leistungsstarke integrierte PHP-Entwicklungsumgebung

    EditPlus chinesische Crack-Version

    EditPlus chinesische Crack-Version

    Geringe Größe, Syntaxhervorhebung, unterstützt keine Code-Eingabeaufforderungsfunktion

    Senden Sie Studio 13.0.1

    Senden Sie Studio 13.0.1

    Leistungsstarke integrierte PHP-Entwicklungsumgebung