w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



area nested within elements

Classified as: flow content, phrasing content

Parents, area

map ancestor required e.g. Syntax 2

If it's nested within the map element, another map element (as ancestor) is not required: e.g. Syntax 1

Children, area

Examples: area parents, nesting area

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

<map name>
<area>
<area>
<⁄map>

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

<map name>
<p>
<area>
<area>
<⁄p>
<⁄map>

<⁄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>
<area>
<⁄head>
<body>

<p>
<area>

<⁄p>

<⁄body>
<⁄html>

Syntax 1: Valid, multiple area elements allowed per HTML5 document; the area element can be nested inside the map element; it's the most common case
Syntax 2: Valid, the area element can be nested inside the p element IF it has a map ancestor
Syntax 3: Invalid, the area element cannot be nested inside the head element, nor inside the p element with a body element as anchestor

area intro area browser display area coordinates for shapes area syntaxarea href alt attributesarea coords attributearea download attributearea hreflang attributearea rel attributearea shape attributearea target attributearea type attribute