HTML <ol> Attributes

HTML <ol> compact Attribute Use of the compact attribute in an ordered HTML list: <ol compact> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> Try it Yourself » Definition and Usage The compact attribute is a boolean attribute. When present, it specifies that the list should render smaller than normal, by reducing the space between lines and the indentation of the list. […]

HTML <ol> Tag

Example 2 different ordered lists: <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol><ol start=”50″> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> Try it Yourself » Definition and Usage The <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical. Use the <li> tag to define list items. Browser Support Element <ol> Yes Yes Yes Yes Yes Tips and Notes Tip: For […]

HTML <ul> Tag

Example An unordered HTML list: <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <ul> tag defines an unordered (bulleted) list. Use the <ul> tag together with the <li> tag to create unordered lists. Browser Support Element <ul> Yes Yes Yes Yes Yes Tips and Notes Tip: Use […]

HTML <dd> Tag

Example A description list, with terms and descriptions: <dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> Try it Yourself » Definition and Usage The <dd> tag is used to describe a term/name in a description list. The <dd> tag is used in conjunction with <dl> (defines a description list) and <dt> (defines terms/names). Inside a <dd> tag […]

HTML <dl> Tag

Example A description list, with terms and descriptions: <dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> Try it Yourself » Definition and Usage The <dl> tag defines a description list. The <dl> tag is used in conjunction with <dt> (defines terms/names) and <dd> (describes each term/name). Browser Support Element <dl> Yes Yes Yes Yes Yes Differences Between […]

HTML Lists

HTML List Example An Unordered List: Item Item Item Item An Ordered List: First item Second item Third item Fourth item Try it Yourself » Unordered HTML List An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items will be marked with bullets (small black circles) by default: Example <ul> […]