w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



dt nested within elements, elements nested within dt

Classified as: -

Parents, dt

Children, dt

Examples: dt parents, dt children

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

<dl>
<dt> ...</dt>
<dd> ...</dd>
<dd> ...</dd>
<dt> <a>...</a></dt>
<dd> ...</dd>
</dl>

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

<dl>
<dd> ...</dd>
<dt> ...</dt>
<dd> ...</dd>
<dt> ...</dt>
<dd> ...</dd>
</dl>

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

<p>
<dt>...</dt>
</p>
<dt>...</dt>

</body>
</html>

Syntax 1: Valid, dt nested within dl, before their corresponding dd elements: allowed; a nested within dt: allowed
Syntax 2: Invalid, dt nested within dl, after their corresponding dd elements: not allowed;
Syntax 3: Invalid, dt nested within elements(head, p, body) other than dl: not allowed

dt intro dt browser display dt syntax