w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



ol ... ⁄ol, optional element ⁄occurrences

The ol element is optional. ol can be added once or multiple times per HTML5 document

Examples:

Valid Syntax 1
ol element absent; ol optional
1
2
3
4
5
6
7
8
9
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

</body>
</html>
Valid Syntax 2
1 ol element present
1
2
3
4
5
6
7
8
9
10
11
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<ol>...</ol>

</body>
</html>
Valid Syntax 3
multiple ol elements present
1
2
3
4
5
6
7
8
9
10
11
12
13
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<ol>...</ol>

<ol>...</ol>

</body>
</html>
ol intro ol browser display ol parents - children ol vs ulol syntaxol reversed attributeol start attributeol type attribute