w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



mark nested within elements, elements nested within mark

Classified as: flow content, phrasing content, palpable content

Parents, mark

Children, mark

Examples: mark parents, mark children

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

<p>
<mark>
...
</mark>
</p>

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

<p>
<mark>
<a>...</a>
</mark>
</p>

</body>
</html>
Invalid Syntax 3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<html>
<head>
<title>...</title>
<mark>...</mark>
</head>
<body>

<mark>
<article>
...
</article>
</mark>

</body>
</html>

Syntax 1: Valid, mark nested within p: allowed
Syntax 2: Valid, a nested within mark: allowed
Syntax 3: Invalid, mark nested within head: not allowed; article nested within mark: not allowed


Note: mark can be nested within body

mark intro mark browser display mark syntax