ol ... ⁄ol, display in browser
Browser display, ol element
- empty ol element (start tag, end tag only): does not display in browser
- non-empty ol element (with li children): displays with a 1em top and bottom margin and a 40px left padding:
- its child: li element:
- empty li element: displays numbers in browser
- non-empty li element: displays numbers + content or numbers + depends on the nested element
- its child: li element:
Display type: block
Video demonstration ol element, view in browser
HTML5 ol, browser display, Tutorial
min | video details |
---|---|
00:07 | ol, li elements: browser display |
00:12 | adding the ol element in page |
00:15 | browser display: none |
00:24 | adding li elements inside the ol element |
00:29 | browser display: numbers for each li element |
00:34 | adding content to li elements (= populating the list) |
00:38 | browser display: the content of the li elements together with their numbers (= their ordinal value) |