w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



a nested within elements, elements nested within a

Classified as: flow content, phrasing content, interactive content, palpable content

Parents, a

Children, a

Examples: a parents, a children

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

<body>

<⁄body>

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

<body>
<p><a>...<⁄a><⁄p>
<⁄body>

<⁄html>
Inalid Syntax 3
1
2
3
4
5
6
7
8
9
10
11
12
<!doctype html>
<html>
<head>
<title>...<⁄title>
<a>...<⁄a>
<⁄head>

<body>

<⁄body>

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

<⁄head>

<body>
<a>
<a>...<⁄a>
<⁄a>
<⁄body>

<⁄html>

Syntax 1: Valid, a element absent; a element is optional
Syntax 2: Valid, one or multiple a elements are allowed per HTML5 document; a element can be nested within the p element
Syntax 3: Invalid, a element cannot be nested inside the head element
Syntax 4: Invalid, interactive content (a element) cannot be nested inside a element

a intro a browser display a warninga syntaxa download attributea href attributea hreflang attributea rel attributea target attributea type attributea itemprop attribute