w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



link nested within elements

Classified as: metadata content, flow content, phrasing content

Parents, link

Children, link


The link element requires:

Examples: link parents

Valid Syntax 1
1
2
3
4
5
6
7
8
9
10
<!doctype html>
<html>
<head>
<title>... <⁄title>
<link rel="keyword">
<⁄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 itemscop itemtype="url">

<link itemprop="property">

<⁄body>
<⁄html>
Valid Syntax 3
1
2
3
4
5
6
7
8
9
10
11
12
<!doctype html>
<html>
<head>
<title>... <⁄title>
<link rel="keyword">
<⁄head>
<body itemscop itemtype="url">

<link itemprop="property">

<⁄body>
<⁄html>

Syntax 1: Validlink element is present in head section
Syntax 2: Validlink element is present in body section
Syntax 3: Validlink element is present both in head and body sections

Video demonstration nesting link

HTML5 nesting link, Tutorial

min video details
00:13 the video tutorial presents the link element placed both in head and body sections
00:22 while rel attribute can be used only in head section
00:28 itemprop attribute can be used in both: head, body
00:35 link in head
00:35 adding the link element in head section: <link rel>
00:53 rel allows us to specify the relationship between the linked resource and the current page: example
00:43 link in head and body
00:43 adding link element in both sections: <link itemprop>
01:31 itemprop allows us to add a property for an item
01:36 concrete example of a link element in body section, itemprop attribute
link intro link optional link browser display link examples & interpretation hyperlink vs external resource link link syntaxlink href attributelink hreflang attributelink media attributelink rel attributelink type attributelink itemprop attributelink title attribute