w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



!–– –– nested within elements, elements nested within !–– ––

Classified as: -

Parents, comment

Children, comment

Examples: comment parents, comment children

Valid Syntax 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!doctype html>
<html>
<head>
<title>...</title>
<!–– ––>
</head>
<body>

<!–– ––>
<p>
<!–– ––>
</p>
<table>
<!–– ––>
</table>
<h1>
<!–– ––>
</h1>
...
</body>
</html>
Valid Syntax 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<!––
<p>...</p>
<a>...</a>
<h2>...</h2>
<ul>...</ul>
<img>
...
––>

</body>
</html>

Syntax 1: Valid, comments can be added inside any element, except void elements (void elements e.g. img, link, hr,.. See the Parents list above)
Syntax 2: Valid, all HTML5 elements can be commented

comment intro comment scripts comment browser display comment forbidden characters comment warningcomment syntax