Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App

How to set the start value of an ordered list in HTML5 ?

Last Updated : 17 Mar, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The start value of an ordered list in HTML5 can be specified by implementing the HTML <ol> start Attribute and passing the starting value (number) as the value to the attribute.

The next values of the list are automatically set in order (e.g. if starting value is set to be 5, the next value will be 6 then 7, and so on).

Syntax:

<ol start="Starting_value">       <li> Content </li>   </ol>

Example 1: After adding start="4" .

HTML
<!DOCTYPE html> <html> <head> <title>Start Example</title> </head> <body> <h3>Following is a list of oop languages</h3>   <ol start="4">     <li>C++</li>     <li>Java</li>     <li>JavaScript</li>     <li>Python</li>   </ol> </body> </html> 

Output:

starts with 4

Example 2: After adding start="15" in <ol>.

HTML
<!DOCTYPE html> <html> <head> <title>Start Example</title> </head> <body> <h3>Grocery list:</h3>   <ol start="15">     <li>Oats</li>     <li>Banana</li>     <li>Milk</li>   </ol> </body> </html> 

Output:

Grocery list 2

M

manishkrjha
Improve
Article Tags :
  • Web Technologies
  • HTML
  • HTML5
  • HTML-Questions

Similar Reads

    How to implement various types of lists in HTML ?
    HTML lists are used to display items in an organized format. There are three types: unordered lists(<ul>), which use bullets; ordered lists (<ol>), which use numbers; and definition lists (<dl>), which pair terms with descriptions. Each type serves specific purposes.HTML lists allo
    4 min read
    What is nesting of list & how to create the nested list in HTML ?
    Nesting of lists in HTML involves placing one list within another list item, creating a hierarchical structure. This is done by embedding a <ul> (unordered) or <ol> (ordered) list inside an <li> (list item) element. The proper way to make a nested HTML list is to use the <ul>
    3 min read
    Unordered, Ordered, and Description Lists in HTML
    Lists are used to store data or information in web pages in ordered or unordered form. HTML supports several types of list elements that can be included in the <BODY>tag of the document. These elements may also be nested, i.e., the onset of elements can be embedded within another. There are th
    5 min read
    How to Create an Unordered List in HTML ?
    An unordered list in HTML is a collection of items displayed with bullet points. To create an unordered list, we can use the <ul> tag to start the list and <li> tags for each items. Unordered lists are usually displayed with bullet points. Syntax<ul> <li>apple</li> <
    1 min read
    How to create a nested webpage in HTML ?
    When the content of one completely different webpage is embedded into another webpage, it is called a nested webpage. In simple words, a webpage that is inside another webpage of a completely different domain. In this article, we are going to learn how to create a nested webpage. There are two metho
    2 min read
    How to define a list item in HTML5?
    To define a list in HTML5 we can use the HTML <li> tag. But there are two types of listing in HTML. One is an ordered list and another one is an unordered list. For ordered we can use HTML <ol> tag and for the unordered list, we will use the HTML <ul> tag. Also, we can change the l
    2 min read
    How to set list in descending order in HTML5 ?
    HTML Lists are used to create informative lists. Any list will have one or more list items. We have three types of lists in HTML. ul: An unordered list is referred to as an ul. Simple bullets would be used to list the items.ol: A number that is arranged in a certain order. This will list the items u
    2 min read
    How to create a list with roman number indexing in HTML ?
    Roman numeral indexing in HTML lists employs Roman numerals (I, II, III, etc.) for item markers. This can be achieved by specifying the type attribute of the <ol> tag as "I", "i", "A", "a", "I", or "i", or by manually numbering list items with Roman numerals. This guide provides all approaches
    2 min read
    How to specify the kind of marker to be used in the list in HTML5 ?
    There are two types of lists in HTML, the first is an ordered list which is created using the <ol></ol> tag, and the second is an unordered list which is created using the <ul></ul> tag. Both of the lists should have a <li></li> tag to represent the data inside th
    3 min read
    What is the way to keep list of elements straight in HTML file ?
    In this article, we will discuss various methods to keep the list of elements straight in an HTML file. Generally, The proper indented content in the browser makes the content well-organized & structured, enhancing the overall readability, along with increasing the interactivity of the website.
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences