You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1993 lines
127 KiB
1993 lines
127 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html lang="en-US-x-Hixie" ><head><title>4.12 Links — HTML5 </title><style type="text/css">
|
|
pre { margin-left: 2em; white-space: pre-wrap; }
|
|
h2 { margin: 3em 0 1em 0; }
|
|
h3 { margin: 2.5em 0 1em 0; }
|
|
h4 { margin: 2.5em 0 0.75em 0; }
|
|
h5, h6 { margin: 2.5em 0 1em; }
|
|
h1 + h2, h1 + h2 + h2 { margin: 0.75em 0 0.75em; }
|
|
h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 0.5em; }
|
|
p { margin: 1em 0; }
|
|
hr:not(.top) { display: block; background: none; border: none; padding: 0; margin: 2em 0; height: auto; }
|
|
dl, dd { margin-top: 0; margin-bottom: 0; }
|
|
dt { margin-top: 0.75em; margin-bottom: 0.25em; clear: left; }
|
|
dt + dt { margin-top: 0; }
|
|
dd dt { margin-top: 0.25em; margin-bottom: 0; }
|
|
dd p { margin-top: 0; }
|
|
dd dl + p { margin-top: 1em; }
|
|
dd table + p { margin-top: 1em; }
|
|
p + * > li, dd li { margin: 1em 0; }
|
|
dt, dfn { font-weight: bold; font-style: normal; }
|
|
dt dfn { font-style: italic; }
|
|
pre, code { font-size: inherit; font-family: monospace; font-variant: normal; }
|
|
pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
|
|
pre em { font-weight: bolder; font-style: normal; }
|
|
@media screen { code { color: orangered; } code :link, code :visited { color: inherit; } }
|
|
var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
|
|
table { border-collapse: collapse; border-style: hidden hidden none hidden; }
|
|
table thead, table tbody { border-bottom: solid; }
|
|
table tbody th:first-child { border-left: solid; }
|
|
table tbody th { text-align: left; }
|
|
table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
|
|
blockquote { margin: 0 0 0 2em; border: 0; padding: 0; font-style: italic; }
|
|
|
|
.bad, .bad *:not(.XXX) { color: gray; border-color: gray; background: transparent; }
|
|
.matrix, .matrix td { border: none; text-align: right; }
|
|
.matrix { margin-left: 2em; }
|
|
.dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
|
|
.dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
|
|
.dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
|
|
|
|
.toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
|
|
img.extra { float: right; }
|
|
pre.idl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; }
|
|
pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
|
|
pre.css { border: solid thin; background: #FFFFEE; color: black; padding: 0.5em 1em; }
|
|
pre.css:first-line { color: #AAAA50; }
|
|
dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
|
|
hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
|
|
dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
|
|
dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
|
|
dl.domintro dd p { margin: 0.5em 0; }
|
|
dl.switch { padding-left: 2em; }
|
|
dl.switch > dt { text-indent: -1.5em; }
|
|
dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
|
|
dl.triple { padding: 0 0 0 1em; }
|
|
dl.triple dt, dl.triple dd { margin: 0; display: inline }
|
|
dl.triple dt:after { content: ':'; }
|
|
dl.triple dd:after { content: '\A'; white-space: pre; }
|
|
.diff-old { text-decoration: line-through; color: silver; background: transparent; }
|
|
.diff-chg, .diff-new { text-decoration: underline; color: green; background: transparent; }
|
|
a .diff-new { border-bottom: 1px blue solid; }
|
|
|
|
h2 { page-break-before: always; }
|
|
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
|
|
h1 + h2, hr + h2.no-toc { page-break-before: auto; }
|
|
|
|
p > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]),
|
|
li > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]), { border-bottom: solid #9999CC; }
|
|
|
|
div.head { margin: 0 0 1em; padding: 1em 0 0 0; }
|
|
div.head p { margin: 0; }
|
|
div.head h1 { margin: 0; }
|
|
div.head .logo { float: right; margin: 0 1em; }
|
|
div.head .logo img { border: none } /* remove border from top image */
|
|
div.head dl { margin: 1em 0; }
|
|
div.head p.copyright, div.head p.alt { font-size: x-small; font-style: oblique; margin: 0; }
|
|
|
|
body > .toc > li { margin-top: 1em; margin-bottom: 1em; }
|
|
body > .toc.brief > li { margin-top: 0.35em; margin-bottom: 0.35em; }
|
|
body > .toc > li > * { margin-bottom: 0.5em; }
|
|
body > .toc > li > * > li > * { margin-bottom: 0.25em; }
|
|
.toc, .toc li { list-style: none; }
|
|
|
|
.brief { margin-top: 1em; margin-bottom: 1em; line-height: 1.1; }
|
|
.brief li { margin: 0; padding: 0; }
|
|
.brief li p { margin: 0; padding: 0; }
|
|
|
|
.category-list { margin-top: -0.75em; margin-bottom: 1em; line-height: 1.5; }
|
|
.category-list::before { content: '\21D2\A0'; font-size: 1.2em; font-weight: 900; }
|
|
.category-list li { display: inline; }
|
|
.category-list li:not(:last-child)::after { content: ', '; }
|
|
.category-list li > span, .category-list li > a { text-transform: lowercase; }
|
|
.category-list li * { text-transform: none; } /* don't affect <code> nested in <a> */
|
|
|
|
.XXX { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
|
|
.XXX > :first-child { margin-top: 0; }
|
|
p .XXX { line-height: 3em; }
|
|
.annotation { border: solid thin black; background: #0C479D; color: white; position: relative; margin: 8px 0 20px 0; }
|
|
.annotation:before { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 6px -6px -6px 6px; background: #333333; z-index: -1; content: ''; }
|
|
.annotation :link, .annotation :visited { color: inherit; }
|
|
.annotation :link:hover, .annotation :visited:hover { background: transparent; }
|
|
.annotation span { border: none ! important; }
|
|
.note { color: green; background: transparent; font-family: sans-serif; }
|
|
.warning { color: red; background: transparent; }
|
|
.note, .warning { font-weight: bolder; font-style: italic; }
|
|
p.note, div.note { padding: 0.5em 2em; }
|
|
span.note { padding: 0 2em; }
|
|
.note p:first-child, .warning p:first-child { margin-top: 0; }
|
|
.note p:last-child, .warning p:last-child { margin-bottom: 0; }
|
|
.warning:before { font-style: normal; }
|
|
p.note:before { content: 'Note: '; }
|
|
p.warning:before { content: '\26A0 Warning! '; }
|
|
|
|
.bookkeeping:before { display: block; content: 'Bookkeeping details'; font-weight: bolder; font-style: italic; }
|
|
.bookkeeping { font-size: 0.8em; margin: 2em 0; }
|
|
.bookkeeping p { margin: 0.5em 2em; display: list-item; list-style: square; }
|
|
.bookkeeping dt { margin: 0.5em 2em 0; }
|
|
.bookkeeping dd { margin: 0 3em 0.5em; }
|
|
|
|
h4 { position: relative; z-index: 3; }
|
|
h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
|
|
.element {
|
|
background: #EEEEFF;
|
|
color: black;
|
|
margin: 0 0 1em 0.15em;
|
|
padding: 0 1em 0.25em 0.75em;
|
|
border-left: solid #9999FF 0.25em;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
.element:before {
|
|
position: absolute;
|
|
z-index: 2;
|
|
top: 0;
|
|
left: -1.15em;
|
|
height: 2em;
|
|
width: 0.9em;
|
|
background: #EEEEFF;
|
|
content: ' ';
|
|
border-style: none none solid solid;
|
|
border-color: #9999FF;
|
|
border-width: 0.25em;
|
|
}
|
|
|
|
.example { display: block; color: #222222; background: #FCFCFC; border-left: double; margin-left: 2em; padding-left: 1em; }
|
|
td > .example:only-child { margin: 0 0 0 0.1em; }
|
|
|
|
ul.domTree, ul.domTree ul { padding: 0 0 0 1em; margin: 0; }
|
|
ul.domTree li { padding: 0; margin: 0; list-style: none; position: relative; }
|
|
ul.domTree li li { list-style: none; }
|
|
ul.domTree li:first-child::before { position: absolute; top: 0; height: 0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
|
|
ul.domTree li:not(:last-child)::after { position: absolute; top: 0; bottom: -0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
|
|
ul.domTree span { font-style: italic; font-family: serif; }
|
|
ul.domTree .t1 code { color: purple; font-weight: bold; }
|
|
ul.domTree .t2 { font-style: normal; font-family: monospace; }
|
|
ul.domTree .t2 .name { color: black; font-weight: bold; }
|
|
ul.domTree .t2 .value { color: blue; font-weight: normal; }
|
|
ul.domTree .t3 code, .domTree .t4 code, .domTree .t5 code { color: gray; }
|
|
ul.domTree .t7 code, .domTree .t8 code { color: green; }
|
|
ul.domTree .t10 code { color: teal; }
|
|
|
|
body.dfnEnabled dfn { cursor: pointer; }
|
|
.dfnPanel {
|
|
display: inline;
|
|
position: absolute;
|
|
z-index: 10;
|
|
height: auto;
|
|
width: auto;
|
|
padding: 0.5em 0.75em;
|
|
font: small sans-serif, Droid Sans Fallback;
|
|
background: #DDDDDD;
|
|
color: black;
|
|
border: outset 0.2em;
|
|
}
|
|
.dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
|
|
.dfnPanel :link, .dfnPanel :visited { color: black; }
|
|
.dfnPanel p { font-weight: bolder; }
|
|
.dfnPanel * + p { margin-top: 0.25em; }
|
|
.dfnPanel li { list-style-position: inside; }
|
|
|
|
#configUI { position: absolute; z-index: 20; top: 10em; right: 1em; width: 11em; font-size: small; }
|
|
#configUI p { margin: 0.5em 0; padding: 0.3em; background: #EEEEEE; color: black; border: inset thin; }
|
|
#configUI p label { display: block; }
|
|
#configUI #updateUI, #configUI .loginUI { text-align: center; }
|
|
#configUI input[type=button] { display: block; margin: auto; }
|
|
|
|
fieldset { margin: 1em; padding: 0.5em 1em; }
|
|
fieldset > legend + * { margin-top: 0; }
|
|
fieldset > :last-child { margin-bottom: 0; }
|
|
fieldset p { margin: 0.5em 0; }
|
|
|
|
.stability {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0; right: 0;
|
|
margin: 0 auto 0 auto !important;
|
|
z-index: 1000;
|
|
width: 50%;
|
|
background: maroon; color: yellow;
|
|
-webkit-border-radius: 1em 1em 0 0;
|
|
-moz-border-radius: 1em 1em 0 0;
|
|
border-radius: 1em 1em 0 0;
|
|
-moz-box-shadow: 0 0 1em #500;
|
|
-webkit-box-shadow: 0 0 1em #500;
|
|
box-shadow: 0 0 1em red;
|
|
padding: 0.5em 1em;
|
|
text-align: center;
|
|
}
|
|
.stability strong {
|
|
display: block;
|
|
}
|
|
.stability input {
|
|
appearance: none; margin: 0; border: 0; padding: 0.25em 0.5em; background: transparent; color: black;
|
|
position: absolute; top: -0.5em; right: 0; font: 1.25em sans-serif; text-align: center;
|
|
}
|
|
.stability input:hover {
|
|
color: white;
|
|
text-shadow: 0 0 2px black;
|
|
}
|
|
.stability input:active {
|
|
padding: 0.3em 0.45em 0.2em 0.55em;
|
|
}
|
|
.stability :link, .stability :visited,
|
|
.stability :link:hover, .stability :visited:hover {
|
|
background: transparent;
|
|
color: white;
|
|
}
|
|
|
|
</style><link href="data:text/css,.impl%20%7B%20display:%20none;%20%7D%0Ahtml%20%7B%20border:%20solid%20yellow;%20%7D%20.domintro:before%20%7B%20display:%20none;%20%7D" id="author" rel="alternate stylesheet" title="Author documentation only"><link href="data:text/css,.impl%20%7B%20background:%20%23FFEEEE;%20%7D%20.domintro:before%20%7B%20background:%20%23FFEEEE;%20%7D" id="highlight" rel="alternate stylesheet" title="Highlight implementation
|
|
requirements"><link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet" type="text/css"><style type="text/css">
|
|
|
|
.applies thead th > * { display: block; }
|
|
.applies thead code { display: block; }
|
|
.applies tbody th { whitespace: nowrap; }
|
|
.applies td { text-align: center; }
|
|
.applies .yes { background: yellow; }
|
|
|
|
.matrix, .matrix td { border: hidden; text-align: right; }
|
|
.matrix { margin-left: 2em; }
|
|
|
|
.dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
|
|
.dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
|
|
.dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
|
|
|
|
td.eg { border-width: thin; text-align: center; }
|
|
|
|
#table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
|
|
#table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
|
|
#table-example-1 caption { padding-bottom: 0.5em; }
|
|
#table-example-1 thead, #table-example-1 tbody { border: none; }
|
|
#table-example-1 th, #table-example-1 td { border: solid thin; }
|
|
#table-example-1 th { font-weight: normal; }
|
|
#table-example-1 td { border-style: none solid; vertical-align: top; }
|
|
#table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
|
|
#table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
|
|
#table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
|
|
#table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
|
|
#table-example-1 tbody td:first-child::after { content: leader(". "); }
|
|
#table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
|
|
#table-example-1 tbody td:first-child + td { width: 10em; }
|
|
#table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
|
|
#table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
|
|
|
|
.apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
|
|
.apple-table-examples * { font-family: "Times", serif; }
|
|
.apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
|
|
.apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
|
|
.apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
|
|
.apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") }
|
|
.apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
|
|
.apple-table-examples td { text-align: right; vertical-align: top; }
|
|
.apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
|
|
.apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
|
|
.apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
|
|
.apple-table-examples sup { line-height: 0; }
|
|
|
|
.details-example img { vertical-align: top; }
|
|
|
|
#base64-table {
|
|
white-space: nowrap;
|
|
font-size: 0.6em;
|
|
column-width: 6em;
|
|
column-count: 5;
|
|
column-gap: 1em;
|
|
-moz-column-width: 6em;
|
|
-moz-column-count: 5;
|
|
-moz-column-gap: 1em;
|
|
-webkit-column-width: 6em;
|
|
-webkit-column-count: 5;
|
|
-webkit-column-gap: 1em;
|
|
}
|
|
#base64-table thead { display: none; }
|
|
#base64-table * { border: none; }
|
|
#base64-table tbody td:first-child:after { content: ':'; }
|
|
#base64-table tbody td:last-child { text-align: right; }
|
|
|
|
#named-character-references-table {
|
|
white-space: nowrap;
|
|
font-size: 0.6em;
|
|
column-width: 30em;
|
|
column-gap: 1em;
|
|
-moz-column-width: 30em;
|
|
-moz-column-gap: 1em;
|
|
-webkit-column-width: 30em;
|
|
-webkit-column-gap: 1em;
|
|
}
|
|
#named-character-references-table > table > tbody > tr > td:first-child + td,
|
|
#named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
|
|
#named-character-references-table > table > tbody > tr > td:last-child:hover > span { position: absolute; top: auto; left: auto; margin-left: 0.5em; line-height: 1.2; font-size: 5em; border: outset; padding: 0.25em 0.5em; background: white; width: 1.25em; height: auto; text-align: center; }
|
|
#named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; }
|
|
|
|
.glyph.control { color: red; }
|
|
|
|
@font-face {
|
|
font-family: 'Essays1743';
|
|
src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743.ttf');
|
|
}
|
|
@font-face {
|
|
font-family: 'Essays1743';
|
|
font-weight: bold;
|
|
src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-Bold.ttf');
|
|
}
|
|
@font-face {
|
|
font-family: 'Essays1743';
|
|
font-style: italic;
|
|
src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-Italic.ttf');
|
|
}
|
|
@font-face {
|
|
font-family: 'Essays1743';
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
src: url('http://www.whatwg.org/specs/web-apps/current-work/fonts/Essays1743-BoldItalic.ttf');
|
|
}
|
|
|
|
</style><style type="text/css">
|
|
.domintro:before { display: table; margin: -1em -0.5em -0.5em auto; width: auto; content: 'This box is non-normative. Implementation requirements are given below this box.'; color: black; font-style: italic; border: solid 2px; background: white; padding: 0 0.25em; }
|
|
</style><script type="text/javascript">
|
|
function getCookie(name) {
|
|
var params = location.search.substr(1).split("&");
|
|
for (var index = 0; index < params.length; index++) {
|
|
if (params[index] == name)
|
|
return "1";
|
|
var data = params[index].split("=");
|
|
if (data[0] == name)
|
|
return unescape(data[1]);
|
|
}
|
|
var cookies = document.cookie.split("; ");
|
|
for (var index = 0; index < cookies.length; index++) {
|
|
var data = cookies[index].split("=");
|
|
if (data[0] == name)
|
|
return unescape(data[1]);
|
|
}
|
|
return null;
|
|
}
|
|
</script>
|
|
<script src="link-fixup.js" type="text/javascript"></script>
|
|
<link href="style.css" rel="stylesheet"><link href="commands.html" title="4.11.5 Commands" rel="prev">
|
|
<link href="spec.html#contents" title="Table of contents" rel="index">
|
|
<link href="browsers.html" title="5 Loading Web pages" rel="next">
|
|
</head><body><div class="head" id="head">
|
|
<div id="multipage-common">
|
|
<p class="stability" id="wip"><strong>This is a work in
|
|
progress!</strong> For the latest updates from the HTML WG, possibly
|
|
including important bug fixes, please look at the <a href="http://dev.w3.org/html5/spec/Overview.html">editor's draft</a> instead.
|
|
There may also be a more
|
|
<a href="http://www.w3.org/TR/html5">up-to-date Working Draft</a>
|
|
with changes based on resolution of Last Call issues.
|
|
<input onclick="closeWarning(this.parentNode)" type="button" value="╳⃝"></p>
|
|
<script type="text/javascript">
|
|
function closeWarning(element) {
|
|
element.parentNode.removeChild(element);
|
|
var date = new Date();
|
|
date.setDate(date.getDate()+4);
|
|
document.cookie = 'hide-obsolescence-warning=1; expires=' + date.toGMTString();
|
|
}
|
|
if (getCookie('hide-obsolescence-warning') == '1')
|
|
setTimeout(function () { document.getElementById('wip').parentNode.removeChild(document.getElementById('wip')); }, 2000);
|
|
</script></div>
|
|
|
|
<p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
|
|
|
|
<h1>HTML5</h1>
|
|
</div><div>
|
|
<a href="commands.html" class="prev">4.11.5 Commands</a> –
|
|
<a href="spec.html#contents">Table of contents</a> –
|
|
<a href="browsers.html" class="next">5 Loading Web pages</a>
|
|
<ol class="toc"><li><ol><li><a href="links.html#links"><span class="secno">4.12 </span>Links</a>
|
|
<ol><li><a href="links.html#introduction-3"><span class="secno">4.12.1 </span>Introduction</a></li><li><a href="links.html#links-created-by-a-and-area-elements"><span class="secno">4.12.2 </span>Links created by <code>a</code> and <code>area</code> elements</a></li><li><a href="links.html#following-hyperlinks"><span class="secno">4.12.3 </span>Following hyperlinks</a></li><li><a href="links.html#linkTypes"><span class="secno">4.12.4 </span>Link types</a>
|
|
<ol><li><a href="links.html#rel-alternate"><span class="secno">4.12.4.1 </span>Link type "<code>alternate</code>"</a></li><li><a href="links.html#link-type-author"><span class="secno">4.12.4.2 </span>Link type "<code>author</code>"</a></li><li><a href="links.html#link-type-bookmark"><span class="secno">4.12.4.3 </span>Link type "<code>bookmark</code>"</a></li><li><a href="links.html#link-type-external"><span class="secno">4.12.4.4 </span>Link type "<code>external</code>"</a></li><li><a href="links.html#link-type-help"><span class="secno">4.12.4.5 </span>Link type "<code>help</code>"</a></li><li><a href="links.html#rel-icon"><span class="secno">4.12.4.6 </span>Link type "<code>icon</code>"</a></li><li><a href="links.html#link-type-license"><span class="secno">4.12.4.7 </span>Link type "<code>license</code>"</a></li><li><a href="links.html#link-type-nofollow"><span class="secno">4.12.4.8 </span>Link type "<code>nofollow</code>"</a></li><li><a href="links.html#link-type-noreferrer"><span class="secno">4.12.4.9 </span>Link type "<code>noreferrer</code>"</a></li><li><a href="links.html#link-type-pingback"><span class="secno">4.12.4.10 </span>Link type "<code>pingback</code>"</a></li><li><a href="links.html#link-type-prefetch"><span class="secno">4.12.4.11 </span>Link type "<code>prefetch</code>"</a></li><li><a href="links.html#link-type-search"><span class="secno">4.12.4.12 </span>Link type "<code>search</code>"</a></li><li><a href="links.html#link-type-sidebar"><span class="secno">4.12.4.13 </span>Link type "<code>sidebar</code>"</a></li><li><a href="links.html#link-type-stylesheet"><span class="secno">4.12.4.14 </span>Link type "<code>stylesheet</code>"</a></li><li><a href="links.html#link-type-tag"><span class="secno">4.12.4.15 </span>Link type "<code>tag</code>"</a></li><li><a href="links.html#sequential-link-types"><span class="secno">4.12.4.16 </span>Sequential link types</a>
|
|
<ol><li><a href="links.html#link-type-next"><span class="secno">4.12.4.16.1 </span>Link type "<code>next</code>"</a></li><li><a href="links.html#link-type-prev"><span class="secno">4.12.4.16.2 </span>Link type "<code>prev</code>"</a></li></ol></li><li><a href="links.html#other-link-types"><span class="secno">4.12.4.17 </span>Other link types</a></li></ol></li></ol></li><li><a href="links.html#common-idioms-without-dedicated-elements"><span class="secno">4.13 </span>Common idioms without dedicated elements</a>
|
|
<ol><li><a href="links.html#the-main-part-of-the-content"><span class="secno">4.13.1 </span>The main part of the content</a></li><li><a href="links.html#rel-up"><span class="secno">4.13.2 </span>Bread crumb navigation</a></li><li><a href="links.html#tag-clouds"><span class="secno">4.13.3 </span>Tag clouds</a></li><li><a href="links.html#conversations"><span class="secno">4.13.4 </span>Conversations</a></li><li><a href="links.html#footnotes"><span class="secno">4.13.5 </span>Footnotes</a></li></ol></li><li><a href="links.html#matching-html-elements-using-selectors"><span class="secno">4.14 </span>Matching HTML elements using selectors</a>
|
|
<ol><li><a href="links.html#selectors"><span class="secno">4.14.1 </span>Case-sensitivity</a></li><li><a href="links.html#pseudo-classes"><span class="secno">4.14.2 </span>Pseudo-classes</a></li></ol></li></ol></li></ol></div>
|
|
|
|
<h3 id="links"><span class="secno">4.12 </span>Links</h3><h4 id="introduction-3"><span class="secno">4.12.1 </span>Introduction</h4><p>Links are a conceptual construct, created by <code><a href="text-level-semantics.html#the-a-element">a</a></code>,
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code>, and <code><a href="semantics.html#the-link-element">link</a></code> elements, that <a href="rendering.html#represents" title="represents">represent</a> a connection between two
|
|
resources, one of which is the current <code><a href="infrastructure.html#document">Document</a></code>. There
|
|
are two kinds of links in HTML:</p><dl><dt><dfn id="external-resource-link" title="external resource link">Links to external
|
|
resources</dfn></dt>
|
|
|
|
<dd><p>These are links to resources that are to be used to augment
|
|
the current document, generally automatically processed by the user
|
|
agent.</p></dd>
|
|
|
|
<dt><dfn id="hyperlink" title="hyperlink">Hyperlinks</dfn></dt>
|
|
|
|
<dd><p>These are links to other resources that are generally
|
|
exposed to the user by the user agent so that the user can cause
|
|
the user agent to <a href="history.html#navigate">navigate</a> to those resources, e.g. to
|
|
visit them in a browser or download them.</p></dd>
|
|
|
|
</dl><p>For <code><a href="semantics.html#the-link-element">link</a></code> elements with an <code title="attr-link-href"><a href="semantics.html#attr-link-href">href</a></code> attribute and a <code title="attr-link-rel"><a href="semantics.html#attr-link-rel">rel</a></code> attribute, links must be created
|
|
for the keywords of the <code title="attr-link-rel"><a href="semantics.html#attr-link-rel">rel</a></code>
|
|
attribute, as defined for those keywords in the <a href="#linkTypes">link types</a> section.</p><p>Similarly, for <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements with
|
|
an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute and a
|
|
<code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code> attribute, links must be
|
|
created for the keywords of the <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code> attribute as defined for those
|
|
keywords in the <a href="#linkTypes">link types</a> section. Unlike
|
|
<code><a href="semantics.html#the-link-element">link</a></code> elements, however, <code><a href="text-level-semantics.html#the-a-element">a</a></code> and
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> element with an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute that either do not
|
|
have a <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code> attribute, or
|
|
whose <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code> attribute has no
|
|
keywords that are defined as specifying <a href="#hyperlink" title="hyperlink">hyperlinks</a>, must also create a
|
|
<a href="#hyperlink">hyperlink</a>. This implied hyperlink has no special
|
|
meaning (it has no <a href="#linkTypes">link type</a>) beyond
|
|
linking the element's document to the resource given by the
|
|
element's <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code>
|
|
attribute.</p><p>A <a href="#hyperlink">hyperlink</a> can have one or more <dfn id="hyperlink-annotation" title="hyperlink annotation">hyperlink annotations</dfn> that modify
|
|
the processing semantics of that hyperlink.</p><h4 id="links-created-by-a-and-area-elements"><span class="secno">4.12.2 </span>Links created by <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements</h4><p>The <dfn id="attr-hyperlink-href" title="attr-hyperlink-href"><code>href</code></dfn>
|
|
attribute on <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements must have
|
|
a value that is a <a href="urls.html#valid-url-potentially-surrounded-by-spaces">valid URL potentially surrounded by
|
|
spaces</a>.</p><p class="note">The <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code>
|
|
attribute on <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements is not
|
|
required; when those elements do not have <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attributes they do not
|
|
create hyperlinks.</p><p>The <dfn id="attr-hyperlink-target" title="attr-hyperlink-target"><code>target</code></dfn>
|
|
attribute, if present, must be a <a href="browsers.html#valid-browsing-context-name-or-keyword">valid browsing context name
|
|
or keyword</a>. It gives the name of the <a href="browsers.html#browsing-context">browsing
|
|
context</a> that will be used. <span class="impl">User agents use
|
|
this name when <a href="#following-hyperlinks">following hyperlinks</a>.</span></p><p>The <dfn id="attr-hyperlink-rel" title="attr-hyperlink-rel"><code>rel</code></dfn>
|
|
attribute on <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements controls
|
|
what kinds of links the elements create. The attribue's value must
|
|
be a <a href="common-microsyntaxes.html#set-of-space-separated-tokens">set of space-separated tokens</a>. The <a href="#linkTypes">allowed keywords and their meanings</a> are
|
|
defined below.</p><p>The <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code> attribute has
|
|
no default value. If the attribute is omitted or if none of the
|
|
values in the attribute are recognized by the user agent, then the
|
|
document has no particular relationship with the destination
|
|
resource other than there being a hyperlink between the two.</p><p>The <dfn id="attr-hyperlink-media" title="attr-hyperlink-media"><code>media</code></dfn>
|
|
attribute describes for which media the target document was
|
|
designed. It is purely advisory. The value must be a <a href="common-microsyntaxes.html#valid-media-query">valid
|
|
media query</a>. The default, if the <code title="attr-hyperlink-media"><a href="#attr-hyperlink-media">media</a></code> attribute is omitted, is
|
|
"<code title="">all</code>".</p><p>The <dfn id="attr-hyperlink-hreflang" title="attr-hyperlink-hreflang"><code>hreflang</code></dfn>
|
|
attribute on <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements that
|
|
create <a href="#hyperlink" title="hyperlink">hyperlinks</a>, if present, gives
|
|
the language of the linked resource. It is purely advisory. The
|
|
value must be a valid BCP 47 language tag. <a href="references.html#refsBCP47">[BCP47]</a> <span class="impl">User agents must
|
|
not consider this attribute authoritative — upon fetching the
|
|
resource, user agents must use only language information associated
|
|
with the resource to determine its language, not metadata included
|
|
in the link to the resource.</span></p><p>The <dfn id="attr-hyperlink-type" title="attr-hyperlink-type"><code>type</code></dfn>
|
|
attribute, if present, gives the <a href="infrastructure.html#mime-type">MIME type</a> of the
|
|
linked resource. It is purely advisory. The value must be a
|
|
<a href="infrastructure.html#valid-mime-type">valid MIME type</a>. <span class="impl">User agents must
|
|
not consider the <code title="attr-hyperlink-type"><a href="#attr-hyperlink-type">type</a></code>
|
|
attribute authoritative — upon fetching the resource, user
|
|
agents must not use metadata included in the link to the resource to
|
|
determine its type.</span></p><div class="impl">
|
|
|
|
<h4 id="following-hyperlinks"><span class="secno">4.12.3 </span><dfn>Following hyperlinks</dfn></h4>
|
|
|
|
<p>When a user <em>follows a hyperlink</em> created by an element,
|
|
the user agent must <a href="urls.html#resolve-a-url" title="resolve a url">resolve</a> the
|
|
<a href="urls.html#url">URL</a> given by the <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute of that element,
|
|
relative to that element, and if that is successful, must
|
|
<a href="history.html#navigate">navigate</a> a <a href="browsers.html#browsing-context">browsing
|
|
context</a> to the resulting <a href="urls.html#absolute-url">absolute URL</a>. In the
|
|
case of server-side image maps, that <a href="urls.html#absolute-url">absolute URL</a> must
|
|
have its <var><a href="text-level-semantics.html#hyperlink-suffix">hyperlink suffix</a></var> appended to it before the
|
|
navigation is started.</p>
|
|
|
|
<p>If <a href="urls.html#resolve-a-url" title="resolve a url">resolving</a> the
|
|
<a href="urls.html#url">URL</a> fails, the user agent may report the error to the
|
|
user in a user-agent-specific manner, may
|
|
<a href="history.html#navigate">navigate</a> to an error page to
|
|
report the error, or may ignore the error and do nothing.</p>
|
|
|
|
<p>If the user indicated a specific <a href="browsers.html#browsing-context">browsing context</a>
|
|
when following the hyperlink, or if the user agent is configured to
|
|
follow hyperlinks by navigating a particular browsing context, then
|
|
that must be the <a href="browsers.html#browsing-context">browsing context</a> that is
|
|
navigated.</p>
|
|
|
|
<p>Otherwise, if the element is an <code><a href="text-level-semantics.html#the-a-element">a</a></code> or
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> element that has a <code title="attr-hyperlink-target"><a href="#attr-hyperlink-target">target</a></code> attribute, then the
|
|
<a href="browsers.html#browsing-context">browsing context</a> that is navigated must be chosen by
|
|
applying <a href="browsers.html#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name">the rules for choosing a browsing context given a
|
|
browsing context name</a>, using the value of the <code title="attr-hyperlink-target"><a href="#attr-hyperlink-target">target</a></code> attribute as the
|
|
browsing context name. If these rules result in the creation of a
|
|
new <a href="browsers.html#browsing-context">browsing context</a>, it must be navigated with
|
|
<a href="history.html#replacement-enabled">replacement enabled</a>.</p>
|
|
|
|
<p>Otherwise, if the hyperlink is a <a href="#rel-sidebar-hyperlink" title="rel-sidebar-hyperlink">sidebar hyperlink</a> and the user
|
|
agent implements a feature that can be considered a secondary
|
|
browsing context, such a secondary browsing context may be selected
|
|
as the browsing context to be navigated.</p>
|
|
|
|
<p>Otherwise, if the element is an <code><a href="text-level-semantics.html#the-a-element">a</a></code> or
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> element with no <code title="attr-hyperlink-target"><a href="#attr-hyperlink-target">target</a></code> attribute, but the
|
|
<code><a href="infrastructure.html#document">Document</a></code> contains a <code><a href="semantics.html#the-base-element">base</a></code> element with a
|
|
<code title="attr-base-target"><a href="semantics.html#attr-base-target">target</a></code> attribute, then the
|
|
browsing context that is navigated must be chosen by applying
|
|
<a href="browsers.html#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name">the rules for choosing a browsing context given a browsing
|
|
context name</a>, using the value of the <code title="attr-base-target"><a href="semantics.html#attr-base-target">target</a></code> attribute of the first such
|
|
<code><a href="semantics.html#the-base-element">base</a></code> element as the browsing context name. If these
|
|
rules result in the creation of a new <a href="browsers.html#browsing-context">browsing context</a>,
|
|
it must be navigated with <a href="history.html#replacement-enabled">replacement enabled</a>.</p>
|
|
|
|
|
|
<p>Otherwise, the browsing context that must be navigated is the
|
|
same browsing context as the one which the element itself is in.</p>
|
|
|
|
<p>The navigation must be done with the <a href="browsers.html#browsing-context">browsing
|
|
context</a> that contains the <code><a href="infrastructure.html#document">Document</a></code> object with
|
|
which the element in question is associated as the <a href="history.html#source-browsing-context">source
|
|
browsing context</a>.</p>
|
|
|
|
</div><h4 id="linkTypes"><span class="secno">4.12.4 </span>Link types</h4><p>The following table summarizes the link types that are defined by
|
|
this specification. This table is non-normative; the actual
|
|
definitions for the link types are given in the next few
|
|
sections.</p><p>In this section, the term <i>referenced document</i> refers to
|
|
the resource identified by the element representing the link, and
|
|
the term <i>current document</i> refers to the resource within
|
|
which the element representing the link finds itself.</p><div class="impl">
|
|
|
|
<p>To determine which link types apply to a <code><a href="semantics.html#the-link-element">link</a></code>,
|
|
<code><a href="text-level-semantics.html#the-a-element">a</a></code>, or <code><a href="the-map-element.html#the-area-element">area</a></code> element, the element's <code title="">rel</code> attribute must be <a href="common-microsyntaxes.html#split-a-string-on-spaces" title="split a string on
|
|
spaces">split on spaces</a>. The resulting tokens are the link
|
|
types that apply to that element.</p>
|
|
|
|
</div><p>Except where otherwise specified, a keyword must not be specified
|
|
more than once per <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code>
|
|
attribute.</p><p>The link types that contain no U+003A COLON characters (:),
|
|
including all those defined in this specification, are <a href="infrastructure.html#ascii-case-insensitive">ASCII
|
|
case-insensitive</a> values<span class="impl">, and must be
|
|
compared as such</span>.</p><p class="example">Thus, <code title="">rel="next"</code> is the
|
|
same as <code title="">rel="NEXT"</code>.</p><table><thead><tr><th rowspan="2">Link type</th>
|
|
<th colspan="2">Effect on...</th>
|
|
<th rowspan="2">Brief description</th>
|
|
</tr><tr><th><code><a href="semantics.html#the-link-element">link</a></code></th>
|
|
<th><code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code></th>
|
|
</tr></thead><tbody><tr><td><code title="rel-alternate"><a href="#rel-alternate">alternate</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Gives alternate representations of the current document.</td>
|
|
</tr><tr><td><code title="rel-author"><a href="#link-type-author">author</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Gives a link to the current document's author.</td>
|
|
</tr><tr><td><code title="rel-bookmark"><a href="#link-type-bookmark">bookmark</a></code></td>
|
|
<td><em>not allowed</em></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Gives the permalink for the nearest ancestor section.</td>
|
|
</tr><tr><td><code title="rel-external"><a href="#link-type-external">external</a></code></td>
|
|
<td><em>not allowed</em></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Indicates that the referenced document is not part of the same site as the current document.</td>
|
|
</tr><tr><td><code title="rel-help"><a href="#link-type-help">help</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Provides a link to context-sensitive help.</td>
|
|
</tr><tr><td><code title="rel-icon"><a href="#rel-icon">icon</a></code></td>
|
|
<td><a href="#external-resource-link" title="external resource link">External Resource</a></td>
|
|
<td><em>not allowed</em></td>
|
|
<td>Imports an icon to represent the current document.</td>
|
|
</tr><tr><td><code title="rel-license"><a href="#link-type-license">license</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Indicates that the main content of the current document is covered by the copyright license described by the referenced document.</td>
|
|
</tr><tr><td><code title="rel-next"><a href="#link-type-next">next</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Indicates that the current document is a part of a series, and that the next document in the series is the referenced document.</td>
|
|
</tr><tr><td><code title="rel-nofollow"><a href="#link-type-nofollow">nofollow</a></code></td>
|
|
<td><em>not allowed</em></td>
|
|
<td><a href="#hyperlink-annotation" title="hyperlink annotation">Annotation</a></td>
|
|
<td>Indicates that the current document's original author or publisher does not endorse the referenced document.</td>
|
|
</tr><tr><td><code title="rel-noreferrer"><a href="#link-type-noreferrer">noreferrer</a></code></td>
|
|
<td><em>not allowed</em></td>
|
|
<td><a href="#hyperlink-annotation" title="hyperlink annotation">Annotation</a></td>
|
|
<td>Requires that the user agent not send an HTTP <code title="http-referer">Referer</code> (sic) header if the user follows the hyperlink.</td>
|
|
</tr><tr><td><code title="rel-pingback"><a href="#link-type-pingback">pingback</a></code></td>
|
|
<td><a href="#external-resource-link" title="external resource link">External Resource</a></td>
|
|
<td><em>not allowed</em></td>
|
|
<td>Gives the address of the pingback server that handles pingbacks to the current document.</td>
|
|
</tr><tr><td><code title="rel-prefetch"><a href="#link-type-prefetch">prefetch</a></code></td>
|
|
<td><a href="#external-resource-link" title="external resource link">External Resource</a></td>
|
|
<td><a href="#external-resource-link" title="external resource link">External Resource</a></td>
|
|
<td>Specifies that the target resource should be preemptively cached.</td>
|
|
</tr><tr><td><code title="rel-prev"><a href="#link-type-prev">prev</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document.</td>
|
|
</tr><tr><td><code title="rel-search"><a href="#link-type-search">search</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Gives a link to a resource that can be used to search through the current document and its related pages.</td>
|
|
</tr><tr><td><code title="rel-sidebar"><a href="#link-type-sidebar">sidebar</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Specifies that the referenced document, if retrieved, is intended to be shown in the browser's sidebar (if it has one).</td>
|
|
</tr><tr><td><code title="rel-stylesheet"><a href="#link-type-stylesheet">stylesheet</a></code></td>
|
|
<td><a href="#external-resource-link" title="external resource link">External Resource</a></td>
|
|
<td><em>not allowed</em></td>
|
|
<td>Imports a stylesheet.</td>
|
|
</tr><tr><td><code title="rel-tag"><a href="#link-type-tag">tag</a></code></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td><a href="#hyperlink">Hyperlink</a></td>
|
|
<td>Gives a tag (identified by the given address) that applies to the current document.</td>
|
|
</tr></tbody></table><div class="impl">
|
|
|
|
<p>Some of the types described below list synonyms for these
|
|
values. These are to be handled as
|
|
specified by user agents, but must not be used in
|
|
documents.</p>
|
|
|
|
</div><h5 id="rel-alternate"><span class="secno">4.12.4.1 </span>Link type "<dfn title="rel-alternate"><code>alternate</code></dfn>"</h5><p>The <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword may be
|
|
used with <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements.</p><p>The meaning of this keyword depends on the values of the other
|
|
attributes.</p><dl class="switch"><dt>If the element is a <code><a href="semantics.html#the-link-element">link</a></code> element and the <code title="attr-link-rel"><a href="semantics.html#attr-link-rel">rel</a></code> attribute also contains the
|
|
keyword <code title="rel-stylesheet"><a href="#link-type-stylesheet">stylesheet</a></code></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword
|
|
modifies the meaning of the <code title="rel-stylesheet"><a href="#link-type-stylesheet">stylesheet</a></code> keyword in the way
|
|
described for that keyword. The <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword does not create a
|
|
link of its own.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>The <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword is
|
|
used with the <code title="attr-hyperlink-type"><a href="#attr-hyperlink-type">type</a></code>
|
|
attribute set to the value <code title="">application/rss+xml</code> or the value <code title="">application/atom+xml</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The keyword creates a <a href="#hyperlink">hyperlink</a> referencing a
|
|
syndication feed (though not necessarily syndicating exactly the
|
|
same content as the current page).</p>
|
|
|
|
<div class="impl">
|
|
|
|
<p>The first <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, or <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
element in the document (in tree order) with the <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword used with the <code title="attr-hyperlink-type"><a href="#attr-hyperlink-type">type</a></code> attribute set to the value
|
|
<code title="">application/rss+xml</code> or the value <code title="">application/atom+xml</code> must be treated as the default
|
|
syndication feed for the purposes of feed autodiscovery.</p>
|
|
|
|
<div class="example">
|
|
<p>The following <code><a href="semantics.html#the-link-element">link</a></code> element gives the syndication
|
|
feed for the current page:</p>
|
|
<pre><link rel="alternate" type="application/atom+xml" href="data.xml"></pre>
|
|
<p>The following extract offers various different syndication
|
|
feeds:</p>
|
|
<pre><p>You can access the planets database using Atom feeds:</p>
|
|
<ul>
|
|
<li><a href="recently-visited-planets.xml" rel="alternate" type="application/atom+xml">Recently Visited Planets</a></li>
|
|
<li><a href="known-bad-planets.xml" rel="alternate" type="application/atom+xml">Known Bad Planets</a></li>
|
|
<li><a href="unexplored-planets.xml" rel="alternate" type="application/atom+xml">Unexplored Planets</a></li>
|
|
</ul></pre>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>Otherwise</dt>
|
|
|
|
<dd>
|
|
|
|
<p>The keyword creates a <a href="#hyperlink">hyperlink</a> referencing an
|
|
alternate representation of the current document.</p>
|
|
|
|
<p>The nature of the referenced document is given by the <code title="attr-hyperlink-media"><a href="#attr-hyperlink-media">media</a></code>, <code title="attr-hyperlink-hreflang"><a href="#attr-hyperlink-hreflang">hreflang</a></code>, and <code title="attr-hyperlink-type"><a href="#attr-hyperlink-type">type</a></code> attributes.</p>
|
|
|
|
<p>If the <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword is
|
|
used with the <code title="attr-hyperlink-media"><a href="#attr-hyperlink-media">media</a></code>
|
|
attribute, it indicates that the referenced document is intended for
|
|
use with the media specified.</p>
|
|
|
|
<p>If the <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword is
|
|
used with the <code title="attr-hyperlink-hreflang"><a href="#attr-hyperlink-hreflang">hreflang</a></code>
|
|
attribute, and that attribute's value differs from the <a href="infrastructure.html#root-element">root
|
|
element</a>'s <a href="elements.html#language">language</a>, it indicates that the
|
|
referenced document is a translation.</p>
|
|
|
|
<p>If the <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword is
|
|
used with the <code title="attr-hyperlink-type"><a href="#attr-hyperlink-type">type</a></code>
|
|
attribute, it indicates that the referenced document is a
|
|
reformulation of the current document in the specified format.</p>
|
|
|
|
<p>The <code title="attr-hyperlink-media"><a href="#attr-hyperlink-media">media</a></code>, <code title="attr-hyperlink-hreflang"><a href="#attr-hyperlink-hreflang">hreflang</a></code>, and <code title="attr-hyperlink-type"><a href="#attr-hyperlink-type">type</a></code> attributes can be combined
|
|
when specified with the <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code>
|
|
keyword.</p>
|
|
|
|
<div class="example">
|
|
|
|
<p>For example, the following link is a French translation that
|
|
uses the PDF format:</p>
|
|
|
|
<pre><link rel=alternate type=application/pdf hreflang=fr href=manual-fr></pre>
|
|
|
|
</div>
|
|
|
|
<p>This relationship is transitive — that is, if a document
|
|
links to two other documents with the link type "<code title="rel-alternate"><a href="#rel-alternate">alternate</a></code>", then, in addition to
|
|
implying that those documents are alternative representations of
|
|
the first document, it is also implying that those two documents
|
|
are alternative representations of each other.</p>
|
|
|
|
</dd>
|
|
|
|
</dl><h5 id="link-type-author"><span class="secno">4.12.4.2 </span>Link type "<dfn title="rel-author"><code>author</code></dfn>"</h5><p>The <code title="rel-author"><a href="#link-type-author">author</a></code> keyword may be
|
|
used with <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>For <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements, the <code title="rel-author"><a href="#link-type-author">author</a></code> keyword indicates that the
|
|
referenced document provides further information about the author of
|
|
the nearest <code><a href="sections.html#the-article-element">article</a></code> element ancestor of the element
|
|
defining the hyperlink, if there is one, or of the page as a whole,
|
|
otherwise.</p><p>For <code><a href="semantics.html#the-link-element">link</a></code> elements, the <code title="rel-author"><a href="#link-type-author">author</a></code> keyword indicates that the
|
|
referenced document provides further information about the author
|
|
for the page as a whole.</p><p class="note">The "referenced document" can be, and often is, a
|
|
<code title="">mailto:</code> URL giving the e-mail address of the
|
|
author. <a href="references.html#refsMAILTO">[MAILTO]</a></p><div class="impl">
|
|
|
|
<p><strong>Synonyms</strong>: For historical reasons, user agents
|
|
must also treat <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> elements that have a <code title="">rev</code>
|
|
attribute with the value "<code>made</code>" as having the <code title="rel-author"><a href="#link-type-author">author</a></code> keyword specified as a link
|
|
relationship.</p>
|
|
|
|
</div><h5 id="link-type-bookmark"><span class="secno">4.12.4.3 </span>Link type "<dfn title="rel-bookmark"><code>bookmark</code></dfn>"</h5><p>The <code title="rel-bookmark"><a href="#link-type-bookmark">bookmark</a></code> keyword may be
|
|
used with <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements. This
|
|
keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-bookmark"><a href="#link-type-bookmark">bookmark</a></code> keyword gives a
|
|
permalink for the nearest ancestor <code><a href="sections.html#the-article-element">article</a></code> element of
|
|
the linking element in question, or of <a href="sections.html#associatedSection">the section the linking element is most
|
|
closely associated with</a>, if there are no ancestor
|
|
<code><a href="sections.html#the-article-element">article</a></code> elements.</p><div class="example">
|
|
<p>The following snippet has three permalinks. A user agent could
|
|
determine which permalink applies to which part of the spec by
|
|
looking at where the permalinks are given.</p>
|
|
<pre> ...
|
|
<body>
|
|
<h1>Example of permalinks</h1>
|
|
<div id="a">
|
|
<h2>First example</h2>
|
|
<p><a href="a.html" rel="bookmark">This</a> permalink applies to
|
|
only the content from the first H2 to the second H2. The DIV isn't
|
|
exactly that section, but it roughly corresponds to it.</p>
|
|
</div>
|
|
<h2>Second example</h2>
|
|
<article id="b">
|
|
<p><a href="b.html" rel="bookmark">This</a> permalink applies to
|
|
the outer ARTICLE element (which could be, e.g., a blog post).</p>
|
|
<article id="c">
|
|
<p><a href="c.html" rel="bookmark">This</a> permalink applies to
|
|
the inner ARTICLE element (which could be, e.g., a blog comment).</p>
|
|
</article>
|
|
</article>
|
|
</body>
|
|
...</pre>
|
|
</div><h5 id="link-type-external"><span class="secno">4.12.4.4 </span>Link type "<dfn title="rel-external"><code>external</code></dfn>"</h5><p>The <code title="rel-external"><a href="#link-type-external">external</a></code> keyword may be
|
|
used with <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements. This
|
|
keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-external"><a href="#link-type-external">external</a></code> keyword indicates
|
|
that the link is leading to a document that is not part of the site
|
|
that the current document forms a part of.</p><h5 id="link-type-help"><span class="secno">4.12.4.5 </span>Link type "<dfn title="rel-help"><code>help</code></dfn>"</h5><p>The <code title="rel-help"><a href="#link-type-help">help</a></code> keyword may be used with
|
|
<code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>For <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements, the <code title="rel-help"><a href="#link-type-help">help</a></code> keyword indicates that the referenced
|
|
document provides further help information for the parent of the
|
|
element defining the hyperlink, and its children.</p><div class="example">
|
|
|
|
<p>In the following example, the form control has associated
|
|
context-sensitive help. The user agent could use this information,
|
|
for example, displaying the referenced document if the user presses
|
|
the "Help" or "F1" key.</p>
|
|
|
|
<pre> <p><label> Topic: <input name=topic> <a href="help/topic.html" rel="help">(Help)</a></label></p></pre>
|
|
|
|
</div><p>For <code><a href="semantics.html#the-link-element">link</a></code> elements, the <code title="rel-help"><a href="#link-type-help">help</a></code> keyword indicates that the referenced
|
|
document provides help for the page as a whole.</p><h5 id="rel-icon"><span class="secno">4.12.4.6 </span>Link type "<dfn title="rel-icon"><code>icon</code></dfn>"</h5><p>The <code title="rel-icon"><a href="#rel-icon">icon</a></code> keyword may be used with
|
|
<code><a href="semantics.html#the-link-element">link</a></code> elements. This keyword creates an <a href="#external-resource-link" title="external resource link">external resource link</a>.</p><div class="impl">
|
|
|
|
<p>The specified resource is an icon representing the page or site,
|
|
and should be used by the user agent when representing the page in
|
|
the user interface.</p>
|
|
|
|
</div><p>Icons could be auditory icons, visual icons, or other kinds of
|
|
icons. <span class="impl">If multiple icons are provided, the user
|
|
agent must select the most appropriate icon according to the <code title="attr-link-type"><a href="semantics.html#attr-link-type">type</a></code>, <code title="attr-link-media"><a href="semantics.html#attr-link-media">media</a></code>, and <code title="attr-link-sizes"><a href="#attr-link-sizes">sizes</a></code> attributes. If there are
|
|
multiple equally appropriate icons, user agents must use the last
|
|
one declared in <a href="infrastructure.html#tree-order">tree order</a>. If the user agent tries to
|
|
use an icon but that icon is determined, upon closer examination, to
|
|
in fact be inappropriate (e.g. because it uses an unsupported
|
|
format), then the user agent must try the next-most-appropriate icon
|
|
as determined by the attributes.</span></p><div class="impl">
|
|
|
|
<p>There is no default type for resources given by the <code title="rel-icon"><a href="#rel-icon">icon</a></code> keyword. However, for the purposes of
|
|
<a href="semantics.html#concept-link-type-sniffing">determining the type of the
|
|
resource</a>, user agents must expect the resource to be an image.</p>
|
|
|
|
</div><p>The <dfn id="attr-link-sizes" title="attr-link-sizes"><code>sizes</code></dfn>
|
|
attribute gives the sizes of icons for visual media.</p><p>If specified, the attribute must have a value that is an
|
|
<a href="common-microsyntaxes.html#unordered-set-of-unique-space-separated-tokens">unordered set of unique space-separated tokens</a>, which
|
|
are <a href="infrastructure.html#ascii-case-insensitive">ASCII case-insensitive</a>. The values must all be
|
|
either an <a href="infrastructure.html#ascii-case-insensitive">ASCII case-insensitive</a> match for the string
|
|
"<code title="attr-link-sizes-any"><a href="#attr-link-sizes-any">any</a></code>", or a value that
|
|
consists of two <a href="common-microsyntaxes.html#valid-non-negative-integer" title="valid non-negative integer">valid
|
|
non-negative integers</a> that do not have a leading U+0030 DIGIT
|
|
ZERO (0) character and that are separated by a single U+0078 LATIN
|
|
SMALL LETTER X or U+0058 LATIN CAPITAL LETTER X character.</p><p>The keywords represent icon sizes.</p><div class="impl">
|
|
|
|
<p>To parse and process the attribute's value, the user agent must
|
|
first <a href="common-microsyntaxes.html#split-a-string-on-spaces" title="split a string on spaces">split the attribute's
|
|
value on spaces</a>, and must then parse each resulting keyword
|
|
to determine what it represents.</p>
|
|
|
|
</div><p>The <dfn id="attr-link-sizes-any" title="attr-link-sizes-any"><code>any</code></dfn> keyword
|
|
represents that the resource contains a scalable icon, e.g. as
|
|
provided by an SVG image.</p><div class="impl">
|
|
|
|
<p>Other keywords must be further parsed as follows to determine
|
|
what they represent:</p>
|
|
|
|
<ul><li><p>If the keyword doesn't contain exactly one U+0078 LATIN
|
|
SMALL LETTER X or U+0058 LATIN CAPITAL LETTER X character, then
|
|
this keyword doesn't represent anything. Abort these steps for that
|
|
keyword.</p></li>
|
|
|
|
<li><p>Let <var title="">width string</var> be the string before
|
|
the "<code title="">x</code>" or "<code title="">X</code>".</p></li>
|
|
|
|
<li><p>Let <var title="">height string</var> be the string after
|
|
the "<code title="">x</code>" or "<code title="">X</code>".</p></li>
|
|
|
|
<li><p>If either <var title="">width string</var> or <var title="">height string</var> start with a U+0030 DIGIT ZERO (0)
|
|
character or contain any characters other than characters in the
|
|
range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then this
|
|
keyword doesn't represent anything. Abort these steps for that
|
|
keyword.</p></li>
|
|
|
|
<li><p>Apply the <a href="common-microsyntaxes.html#rules-for-parsing-non-negative-integers">rules for parsing non-negative
|
|
integers</a> to <var title="">width string</var> to obtain <var title="">width</var>.</p></li>
|
|
|
|
<li><p>Apply the <a href="common-microsyntaxes.html#rules-for-parsing-non-negative-integers">rules for parsing non-negative
|
|
integers</a> to <var title="">height string</var> to obtain <var title="">height</var>.</p></li>
|
|
|
|
<li><p>The keyword represents that the resource contains a bitmap
|
|
icon with a width of <var title="">width</var> device pixels and a
|
|
height of <var title="">height</var> device pixels.</p></li>
|
|
|
|
</ul></div><p>The keywords specified on the <code title="attr-link-sizes"><a href="#attr-link-sizes">sizes</a></code> attribute must not represent
|
|
icon sizes that are not actually available in the linked
|
|
resource.</p><div class="impl">
|
|
|
|
<p>If the attribute is not specified, then the user agent must
|
|
assume that the given icon is appropriate, but less appropriate than
|
|
an icon of a known and appropriate size.</p>
|
|
|
|
<p>In the absence of a <code><a href="semantics.html#the-link-element">link</a></code> with the <code title="rel-icon"><a href="#rel-icon">icon</a></code> keyword, for <code><a href="infrastructure.html#document">Document</a></code>s
|
|
obtained over HTTP or HTTPS, user agents may instead attempt to
|
|
<a href="fetching-resources.html#fetch">fetch</a> and use an icon with the <a href="urls.html#absolute-url">absolute
|
|
URL</a> obtained by resolving the <a href="urls.html#url">URL</a> "<code title="">/favicon.ico</code>" against <a href="dom.html#the-document-s-address">the document's
|
|
address</a>, as if the page had declared that icon using the
|
|
<code title="rel-icon"><a href="#rel-icon">icon</a></code> keyword.</p>
|
|
|
|
</div><div class="example">
|
|
|
|
<p>The following snippet shows the top part of an application with
|
|
several icons.</p>
|
|
|
|
<pre><!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>lsForums — Inbox</title>
|
|
<link rel=icon href=favicon.png sizes="16x16" type="image/png">
|
|
<link rel=icon href=windows.ico sizes="32x32 48x48" type="image/vnd.microsoft.icon">
|
|
<link rel=icon href=mac.icns sizes="128x128 512x512 8192x8192 32768x32768">
|
|
<link rel=icon href=iphone.png sizes="57x57" type="image/png">
|
|
<link rel=icon href=gnome.svg sizes="any" type="image/svg+xml">
|
|
<link rel=stylesheet href=lsforums.css>
|
|
<script src=lsforums.js></script>
|
|
<meta name=application-name content="lsForums">
|
|
</head>
|
|
<body>
|
|
...</pre>
|
|
|
|
</div><h5 id="link-type-license"><span class="secno">4.12.4.7 </span>Link type "<dfn title="rel-license"><code>license</code></dfn>"</h5><p>The <code title="rel-license"><a href="#link-type-license">license</a></code> keyword may be used
|
|
with <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-license"><a href="#link-type-license">license</a></code> keyword indicates
|
|
that the referenced document provides the copyright license terms
|
|
under which the main content of the current document is
|
|
provided.</p><p>This specification does not specify how to distinguish between
|
|
the main content of a document and content that is not deemed to be
|
|
part of that main content. The distinction should be made clear to
|
|
the user.</p><div class="example">
|
|
|
|
<p>Consider a photo sharing site. A page on that site might
|
|
describe and show a photograph, and the page might be marked up as
|
|
follows:</p>
|
|
|
|
<pre><!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Exampl Pictures: Kissat</title>
|
|
<link rel="stylesheet" href="/style/default">
|
|
</head>
|
|
<body>
|
|
<h1>Kissat</h1>
|
|
<nav>
|
|
<a href="../">Return to photo index</a>
|
|
</nav>
|
|
<figure>
|
|
<img src="/pix/39627052_fd8dcd98b5.jpg">
|
|
<figcaption>Kissat</figcaption>
|
|
</figure>
|
|
<p>One of them has six toes!</p>
|
|
<p><small><a rel="license" href="http://www.opensource.org/licenses/mit-license.php">MIT Licensed</a></small></p>
|
|
<footer>
|
|
<a href="/">Home</a> | <a href="../">Photo index</a>
|
|
<p><small>© copyright 2009 Exampl Pictures. All Rights Reserved.</small></p>
|
|
</footer>
|
|
</body>
|
|
</html></pre>
|
|
|
|
<p>In this case the <code title="rel-license"><a href="#link-type-license">license</a></code>
|
|
applies to just the photo (the main content of the document), not
|
|
the whole document. In particular not the design of the page
|
|
itself, which is covered by the copyright given at the bottom of
|
|
the document. This could be made clearer in the styling
|
|
(e.g. making the license link prominently positioned near the
|
|
photograph, while having the page copyright in light small text at
|
|
the foot of the page.</p>
|
|
|
|
</div><div class="impl">
|
|
|
|
<p><strong>Synonyms</strong>: For historical reasons, user agents
|
|
must also treat the keyword "<code title="">copyright</code>" like
|
|
the <code title="rel-license"><a href="#link-type-license">license</a></code> keyword.</p>
|
|
|
|
</div><h5 id="link-type-nofollow"><span class="secno">4.12.4.8 </span>Link type "<dfn title="rel-nofollow"><code>nofollow</code></dfn>"</h5><p>The <code title="rel-nofollow"><a href="#link-type-nofollow">nofollow</a></code> keyword may be
|
|
used with <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements. This
|
|
keyword does not create a <a href="#hyperlink">hyperlink</a>, but <a href="#hyperlink-annotation" title="hyperlink annotation">annotates</a> any other hyperlinks
|
|
created by the element (the implied hyperlink, if no other keywords
|
|
create one).</p><p>The <code title="rel-nofollow"><a href="#link-type-nofollow">nofollow</a></code> keyword indicates
|
|
that the link is not endorsed by the original author or publisher of
|
|
the page, or that the link to the referenced document was included
|
|
primarily because of a commercial relationship between people
|
|
affiliated with the two pages.</p><h5 id="link-type-noreferrer"><span class="secno">4.12.4.9 </span>Link type "<dfn title="rel-noreferrer"><code>noreferrer</code></dfn>"</h5><p>The <code title="rel-noreferrer"><a href="#link-type-noreferrer">noreferrer</a></code> keyword may be
|
|
used with <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code> elements. This
|
|
keyword does not create a <a href="#hyperlink">hyperlink</a>, but <a href="#hyperlink-annotation" title="hyperlink annotation">annotates</a> any other hyperlinks
|
|
created by the element (the implied hyperlink, if no other keywords
|
|
create one).</p><p>It indicates that no referrer information is to be leaked when
|
|
following the link.</p><div class="impl">
|
|
|
|
<p>If a user agent follows a link defined by an <code><a href="text-level-semantics.html#the-a-element">a</a></code> or
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> element that has the <code title="rel-noreferrer"><a href="#link-type-noreferrer">noreferrer</a></code> keyword, the user agent
|
|
must not include a <code title="http-referer">Referer</code> (sic)
|
|
HTTP header (<a href="fetching-resources.html#concept-http-equivalent-headers" title="concept-http-equivalent-headers">or
|
|
equivalent</a> for other protocols) in the request.</p>
|
|
|
|
<p>This keyword also <a href="browsers.html#noopener">causes the <code title="dom-opener">opener</code> attribute to remain null</a> if the
|
|
hyperlink creates a new <a href="browsers.html#browsing-context">browsing context</a>.</p>
|
|
|
|
</div><h5 id="link-type-pingback"><span class="secno">4.12.4.10 </span>Link type "<dfn title="rel-pingback"><code>pingback</code></dfn>"</h5><p>The <code title="rel-pingback"><a href="#link-type-pingback">pingback</a></code> keyword may be
|
|
used with <code><a href="semantics.html#the-link-element">link</a></code> elements. This keyword creates an <a href="#external-resource-link" title="external resource link">external resource link</a>.</p><p>For the semantics of the <code title="rel-pingback"><a href="#link-type-pingback">pingback</a></code> keyword, see the Pingback 1.0
|
|
specification. <a href="references.html#refsPINGBACK">[PINGBACK]</a></p><h5 id="link-type-prefetch"><span class="secno">4.12.4.11 </span>Link type "<dfn title="rel-prefetch"><code>prefetch</code></dfn>"</h5><p>The <code title="rel-prefetch"><a href="#link-type-prefetch">prefetch</a></code> keyword may be
|
|
used with <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates an <a href="#external-resource-link" title="external resource
|
|
link">external resource link</a>.</p><p>The <code title="rel-prefetch"><a href="#link-type-prefetch">prefetch</a></code> keyword indicates
|
|
that preemptively fetching and caching the specified resource is
|
|
likely to be beneficial, as it is highly likely that the user will
|
|
require this resource.</p><p>There is no default type for resources given by the <code title="rel-prefetch"><a href="#link-type-prefetch">prefetch</a></code> keyword.</p><h5 id="link-type-search"><span class="secno">4.12.4.12 </span>Link type "<dfn title="rel-search"><code>search</code></dfn>"</h5><p>The <code title="rel-search"><a href="#link-type-search">search</a></code> keyword may be used
|
|
with <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-search"><a href="#link-type-search">search</a></code> keyword indicates that
|
|
the referenced document provides an interface specifically for
|
|
searching the document and its related resources.</p><p class="note">OpenSearch description documents can be used with
|
|
<code><a href="semantics.html#the-link-element">link</a></code> elements and the <code title="rel-search"><a href="#link-type-search">search</a></code> link type to enable user agents to
|
|
autodiscover search interfaces. <a href="references.html#refsOPENSEARCH">[OPENSEARCH]</a></p><h5 id="link-type-sidebar"><span class="secno">4.12.4.13 </span>Link type "<dfn title="rel-sidebar"><code>sidebar</code></dfn>"</h5><p>The <code title="rel-sidebar"><a href="#link-type-sidebar">sidebar</a></code> keyword may be used
|
|
with <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-sidebar"><a href="#link-type-sidebar">sidebar</a></code> keyword indicates
|
|
that the referenced document, if retrieved, is intended to be shown
|
|
in a <a href="browsers.html#secondary-browsing-context">secondary browsing context</a> (if possible), instead
|
|
of in the current <a href="browsers.html#browsing-context">browsing context</a>.</p><p>A <a href="#hyperlink">hyperlink</a> with the <code title="rel-sidebar"><a href="#link-type-sidebar">sidebar</a></code> keyword specified is a <dfn id="rel-sidebar-hyperlink" title="rel-sidebar-hyperlink">sidebar hyperlink</dfn>.</p><h5 id="link-type-stylesheet"><span class="secno">4.12.4.14 </span>Link type "<dfn title="rel-stylesheet"><code>stylesheet</code></dfn>"</h5><p>The <code title="rel-stylesheet"><a href="#link-type-stylesheet">stylesheet</a></code> keyword may be
|
|
used with <code><a href="semantics.html#the-link-element">link</a></code> elements. This keyword creates an <a href="#external-resource-link" title="external resource link">external resource link</a> that
|
|
contributes to the <a href="semantics.html#styling">styling processing model</a>.</p><p>The specified resource is a resource that describes how to
|
|
present the document. Exactly how the resource is to be processed
|
|
depends on the actual type of the resource.</p><p>If the <code title="rel-alternate"><a href="#rel-alternate">alternate</a></code> keyword is
|
|
also specified on the <code><a href="semantics.html#the-link-element">link</a></code> element, then <dfn id="the-link-is-an-alternative-stylesheet">the link
|
|
is an alternative stylesheet</dfn>; in this case, the <code title="attr-title"><a href="elements.html#the-title-attribute">title</a></code> attribute must be specified on the
|
|
<code><a href="semantics.html#the-link-element">link</a></code> element, with a non-empty value.</p><p>The default type for resources given by the <code title="rel-stylesheet"><a href="#link-type-stylesheet">stylesheet</a></code> keyword is <code title="">text/css</code>.</p><div class="impl">
|
|
|
|
<p>The appropriate time to <a href="semantics.html#concept-link-obtain" title="concept-link-obtain">obtain</a> the resource is when the
|
|
<a href="#external-resource-link" title="external resource link">external resource link</a>
|
|
is created or when its element is <a href="infrastructure.html#insert-an-element-into-a-document" title="insert an element
|
|
into a document">inserted into a document</a>, whichever happens
|
|
last. If the resource is <a href="#the-link-is-an-alternative-stylesheet" title="the link is an alternative
|
|
stylesheet">an alternative stylesheet</a> then the user agent may
|
|
defer obtaining the resource until it is part of the <span>preferred
|
|
style sheet set</span>. <a href="references.html#refsCSSOM">[CSSOM]</a></p>
|
|
<p><strong>Quirk</strong>: If the document has been set to
|
|
<a href="dom.html#quirks-mode">quirks mode</a>, has the <a href="origin-0.html#same-origin">same origin</a> as the
|
|
<a href="urls.html#url">URL</a> of the external resource<!-- CVE-2010-0654 -->, and
|
|
the <a href="fetching-resources.html#content-type" title="Content-Type">Content-Type metadata</a> of the
|
|
external resource is not a supported style sheet type, the user
|
|
agent must instead assume it to be <code title="">text/css</code>.</p>
|
|
|
|
</div><h5 id="link-type-tag"><span class="secno">4.12.4.15 </span>Link type "<dfn title="rel-tag"><code>tag</code></dfn>"</h5><p>The <code title="rel-tag"><a href="#link-type-tag">tag</a></code> keyword may be used
|
|
with <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-tag"><a href="#link-type-tag">tag</a></code> keyword indicates that the
|
|
<em>tag</em> that the referenced document represents applies to the
|
|
current document.</p><p class="note">Since it indicates that the tag <em>applies to the
|
|
current document</em>, it would be inappropriate to use this keyword
|
|
in the markup of a <a href="#tag-cloud">tag cloud</a>, which lists
|
|
the popular tag across a set of pages.</p><h5 id="sequential-link-types"><span class="secno">4.12.4.16 </span>Sequential link types</h5><p>Some documents form part of a sequence of documents.</p><p>A sequence of documents is one where each document can have a
|
|
<em>previous sibling</em> and a <em>next sibling</em>. A document
|
|
with no previous sibling is the start of its sequence, a document
|
|
with no next sibling is the end of its sequence.</p><p>A document may be part of multiple sequences.</p><h6 id="link-type-next"><span class="secno">4.12.4.16.1 </span>Link type "<dfn title="rel-next"><code>next</code></dfn>"</h6><p>The <code title="rel-next"><a href="#link-type-next">next</a></code> keyword may be used with
|
|
<code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-next"><a href="#link-type-next">next</a></code> keyword indicates that the
|
|
document is part of a sequence, and that the link is leading to the
|
|
document that is the next logical document in the sequence.</p><h6 id="link-type-prev"><span class="secno">4.12.4.16.2 </span>Link type "<dfn title="rel-prev"><code>prev</code></dfn>"</h6><p>The <code title="rel-prev"><a href="#link-type-prev">prev</a></code> keyword may be used with
|
|
<code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code>
|
|
elements. This keyword creates a <a href="#hyperlink">hyperlink</a>.</p><p>The <code title="rel-prev"><a href="#link-type-prev">prev</a></code> keyword indicates that the
|
|
document is part of a sequence, and that the link is leading to the
|
|
document that is the previous logical document in the sequence.</p><div class="impl">
|
|
|
|
<p><strong>Synonyms</strong>: For historical reasons, user agents
|
|
must also treat the keyword "<code title="">previous</code>" like
|
|
the <code title="rel-prev"><a href="#link-type-prev">prev</a></code> keyword.</p>
|
|
|
|
</div><h5 id="other-link-types"><span class="secno">4.12.4.17 </span>Other link types</h5><p><dfn id="concept-rel-extensions" title="concept-rel-extensions">Extensions to the predefined
|
|
set of link types</dfn> may be registered in the <a href="http://microformats.org/wiki/existing-rel-values">Microformats wiki existing-rel-values page</a>. <a href="references.html#refsMFREL">[MFREL]</a></p><p>Anyone is free to edit the <span title="">Microformats wiki
|
|
existing-rel-values page</span> at any time to add a type. Extension
|
|
types must be specified with the following information:</p><dl><dt>Keyword</dt>
|
|
|
|
<dd>
|
|
|
|
<p>The actual value being defined. The value should not be
|
|
confusingly similar to any other defined value (e.g. differing
|
|
only in case).</p>
|
|
|
|
<p>If the value contains a U+003A COLON character (:), it must
|
|
also be an <a href="urls.html#absolute-url">absolute URL</a>.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt>Effect on... <code><a href="semantics.html#the-link-element">link</a></code></dt>
|
|
|
|
<dd>
|
|
|
|
<p>One of the following:</p>
|
|
|
|
<dl><dt>Not allowed</dt>
|
|
|
|
<dd>The keyword must not be specified on <code><a href="semantics.html#the-link-element">link</a></code>
|
|
elements.</dd>
|
|
|
|
<dt>Hyperlink</dt>
|
|
|
|
<dd>The keyword may be specified on a <code><a href="semantics.html#the-link-element">link</a></code> element;
|
|
it creates a <a href="#hyperlink">hyperlink</a>.</dd>
|
|
|
|
<dt>External Resource</dt>
|
|
|
|
<dd>The keyword may be specified on a <code><a href="semantics.html#the-link-element">link</a></code> element;
|
|
it creates an <a href="#external-resource-link">external resource link</a>.</dd>
|
|
|
|
</dl></dd>
|
|
|
|
|
|
<dt>Effect on... <code><a href="text-level-semantics.html#the-a-element">a</a></code> and <code><a href="the-map-element.html#the-area-element">area</a></code></dt>
|
|
|
|
<dd>
|
|
|
|
<p>One of the following:</p>
|
|
|
|
<dl><dt>Not allowed</dt>
|
|
|
|
<dd>The keyword must not be specified on <code><a href="text-level-semantics.html#the-a-element">a</a></code> and
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> elements.</dd>
|
|
|
|
<dt>Hyperlink</dt>
|
|
|
|
<dd>The keyword may be specified on <code><a href="text-level-semantics.html#the-a-element">a</a></code> and
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> elements; it creates a
|
|
<a href="#hyperlink">hyperlink</a>.</dd>
|
|
|
|
<dt>External Resource</dt>
|
|
|
|
<dd>The keyword may be specified on a <code><a href="text-level-semantics.html#the-a-element">a</a></code> and
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> elements; it creates an <a href="#external-resource-link">external resource
|
|
link</a>.</dd>
|
|
|
|
<dt>Hyperlink Annotation</dt>
|
|
|
|
<dd>The keyword may be specified on a <code><a href="text-level-semantics.html#the-a-element">a</a></code> and
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> elements; it <a href="#hyperlink-annotation" title="hyperlink
|
|
annotation">annotates</a> other <a href="#hyperlink" title="hyperlink">hyperlinks</a> created by the element.</dd>
|
|
|
|
</dl></dd>
|
|
|
|
|
|
<dt>Brief description</dt>
|
|
|
|
<dd><p>A short non-normative description of what the keyword's
|
|
meaning is.</p></dd>
|
|
|
|
|
|
<dt>Specification</dt>
|
|
|
|
<dd><p>A link to a more detailed description of the keyword's
|
|
semantics and requirements. It could be another page on the Wiki,
|
|
or a link to an external page.</p></dd>
|
|
|
|
|
|
<dt>Synonyms</dt>
|
|
|
|
<dd><p>A list of other keyword values that have exactly the same
|
|
processing requirements. Authors should not use the values defined
|
|
to be synonyms, they are only intended to allow user agents to
|
|
support legacy content. Anyone may remove synonyms that are not
|
|
used in practice; only names that need to be processed as synonyms
|
|
for compatibility with legacy content are to be registered in this
|
|
way.</p></dd>
|
|
|
|
|
|
<dt>Status</dt>
|
|
|
|
<dd>
|
|
|
|
<p>One of the following:</p>
|
|
|
|
<dl><dt>Proposed</dt>
|
|
|
|
<dd>The keyword has not received wide peer review and
|
|
approval. Someone has proposed it and is, or soon will be, using
|
|
it.</dd>
|
|
|
|
<dt>Ratified</dt>
|
|
|
|
<dd>The keyword has received wide peer review and approval. It
|
|
has a specification that unambiguously defines how to handle
|
|
pages that use the keyword, including when they use it in
|
|
incorrect ways.</dd>
|
|
|
|
<dt>Discontinued</dt>
|
|
|
|
<dd>The keyword has received wide peer review and it has been
|
|
found wanting. Existing pages are using this keyword, but new
|
|
pages should avoid it. The "brief description" and
|
|
"specification" entries will give details of what authors should
|
|
use instead, if anything.</dd>
|
|
|
|
</dl><p>If a keyword is found to be redundant with existing values, it
|
|
should be removed and listed as a synonym for the existing
|
|
value.</p>
|
|
|
|
<p>If a keyword is registered in the "proposed" state for a
|
|
period of a month or more without being used or specified, then it
|
|
may be removed from the registry.</p>
|
|
|
|
<p>If a keyword is added with the "proposed" status and found to
|
|
be redundant with existing values, it should be removed and listed
|
|
as a synonym for the existing value. If a keyword is added with
|
|
the "proposed" status and found to be harmful, then it should be
|
|
changed to "discontinued" status.</p>
|
|
|
|
<p>Anyone can change the status at any time, but should only do so
|
|
in accordance with the definitions above.</p>
|
|
|
|
</dd>
|
|
|
|
</dl><div class="impl">
|
|
|
|
<p>Conformance checkers must use the information given on the <span title="">Microformats wiki existing-rel-values page</span> to
|
|
establish if a value is allowed or not: values defined in this
|
|
specification or marked as "proposed" or "ratified" must be accepted
|
|
when used on the elements for which they apply as described in the
|
|
"Effect on..." field, whereas values marked as "discontinued" or not
|
|
listed in either this specification or on the aforementioned page
|
|
must be rejected as invalid. Conformance checkers may cache this
|
|
information (e.g. for performance reasons or to avoid the use of
|
|
unreliable network connectivity).</p>
|
|
|
|
<p>When an author uses a new type not defined by either this
|
|
specification or the Wiki page, conformance checkers should offer to
|
|
add the value to the Wiki, with the details described above, with
|
|
the "proposed" status.</p>
|
|
|
|
</div><p>Types defined as extensions in the <a href="http://microformats.org/wiki/existing-rel-values">Microformats
|
|
wiki existing-rel-values page</a> with the status "proposed" or
|
|
"ratified" may be used with the <code title="">rel</code> attribute
|
|
on <code><a href="semantics.html#the-link-element">link</a></code>, <code><a href="text-level-semantics.html#the-a-element">a</a></code>, and <code><a href="the-map-element.html#the-area-element">area</a></code> elements
|
|
in accordance to the "Effect on..." field. <a href="references.html#refsMFREL">[MFREL]</a></p><h3 id="common-idioms-without-dedicated-elements"><span class="secno">4.13 </span>Common idioms without dedicated elements</h3><h4 id="the-main-part-of-the-content"><span class="secno">4.13.1 </span>The main part of the content</h4><p>The main content of a page — not including headers and
|
|
footers, navigation links, sidebars, advertisements, and so forth
|
|
— can be marked up in a variety of ways, depending on the
|
|
needs of the author.</p><p>The simplest solution is to not mark up the main content at all,
|
|
and just leave it as implicit. Another way to think of this is that
|
|
the <code><a href="sections.html#the-body-element">body</a></code> elements marks up the main content of the
|
|
page, and the bits that aren't main content are excluded through the
|
|
use of more appropriate elements like <code><a href="sections.html#the-aside-element">aside</a></code> and
|
|
<code><a href="sections.html#the-nav-element">nav</a></code>.</p><div class="example">
|
|
|
|
<p>Here is a short Web page marked up along this minimalistic
|
|
school of thought. The main content is highlighted. Notice how all
|
|
the <em>other</em> content in the <code><a href="sections.html#the-body-element">body</a></code> is marked up
|
|
with elements to indicate that it's not part of the main content,
|
|
in this case <code><a href="sections.html#the-header-element">header</a></code>, <code><a href="sections.html#the-nav-element">nav</a></code>, and
|
|
<code><a href="sections.html#the-footer-element">footer</a></code>.</p>
|
|
|
|
<pre><!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title> My Toys </title>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>My toys</h1>
|
|
</header>
|
|
<nav>
|
|
<p><a href="/">Home</a></p>
|
|
<p><a href="/contact">Contact</a></p>
|
|
</nav>
|
|
<strong> <p>I really like my chained book and my telephone. I'm not such a
|
|
fan of my big ball.</p>
|
|
<p>Another toy I like is my mirror.</p></strong>
|
|
<footer>
|
|
<p>© copyright 2010 by the boy</p>
|
|
</footer>
|
|
</body>
|
|
</html></pre>
|
|
|
|
</div><p>If the main content is an independent unit of content that one
|
|
could imagine syndicating independently, then the
|
|
<code><a href="sections.html#the-article-element">article</a></code> element would be appropriate to mark up the
|
|
main content of the document.</p><div class="example">
|
|
|
|
<p>The document in the previous example is here recast as a blog
|
|
post:</p>
|
|
|
|
<pre><!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title> The Boy Blog: My Toys </title>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>The Boy Blog</h1>
|
|
</header>
|
|
<nav>
|
|
<p><a href="/">Home</a></p>
|
|
<p><a href="/contact">Contact</a></p>
|
|
</nav>
|
|
<strong> <article>
|
|
<header>
|
|
<h1>My toys</h1>
|
|
<p>Published <time pubdate datetime="2010-08-04">August 4th</time></p>
|
|
</header>
|
|
<p>I really like my chained book and my telephone. I'm not such a
|
|
fan of my big ball.</p>
|
|
<p>Another toy I like is my mirror.</p>
|
|
</article></strong>
|
|
<footer>
|
|
<p>© copyright 2010 by the boy</p>
|
|
</footer>
|
|
</body>
|
|
</html></pre>
|
|
|
|
</div><p>If the main content is not an independent unit of content so much
|
|
as a section of a larger work, for instance a chapter, then the
|
|
<code><a href="sections.html#the-section-element">section</a></code> element would be appropriate to mark up the
|
|
main content of the document.</p><div class="example">
|
|
|
|
<p>Here is the same document, case as a chapter in an online
|
|
book:</p>
|
|
|
|
<pre><!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title> Chapter 2: My Toys — The Book of the Boy </title>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>Chapter 2: My Toys</h1>
|
|
</header>
|
|
<nav>
|
|
<p><a href="/">Front Page</a></p>
|
|
<p><a href="/toc">Table of Contents</a></p>
|
|
<p><a href="/c1">Chapter 1</a> — <a href="/c3">Chapter 3</a></p>
|
|
</nav>
|
|
<strong> <section>
|
|
<p>I really like my chained book and my telephone. I'm not such a
|
|
fan of my big ball.</p>
|
|
<p>Another toy I like is my mirror.</p>
|
|
</section></strong>
|
|
<footer>
|
|
<p>© copyright 2010 by the boy</p>
|
|
</footer>
|
|
</body>
|
|
</html></pre>
|
|
|
|
</div><p>If neither <code><a href="sections.html#the-article-element">article</a></code> nor <code><a href="sections.html#the-section-element">section</a></code> would be
|
|
appropriate, but the main content still needs an explicit element,
|
|
for example for styling purposes, then the <code><a href="grouping-content.html#the-div-element">div</a></code> element
|
|
can be used.</p><div class="example">
|
|
|
|
<p>This is the same as the original example, but using
|
|
<code><a href="grouping-content.html#the-div-element">div</a></code> for the main content instead of leaving it
|
|
implied:</p>
|
|
|
|
<pre><!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title> My Toys </title>
|
|
<style>
|
|
body > div { background: navy; color: yellow; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>My toys</h1>
|
|
</header>
|
|
<nav>
|
|
<p><a href="/">Home</a></p>
|
|
<p><a href="/contact">Contact</a></p>
|
|
</nav>
|
|
<strong> <div>
|
|
<p>I really like my chained book and my telephone. I'm not such a
|
|
fan of my big ball.</p>
|
|
<p>Another toy I like is my mirror.</p>
|
|
</div></strong>
|
|
<footer>
|
|
<p>© copyright 2010 by the boy</p>
|
|
</footer>
|
|
</body>
|
|
</html></pre>
|
|
|
|
</div><h4 id="rel-up"><span class="secno">4.13.2 </span>Bread crumb navigation</h4><p>This specification does not provide a machine-readable way of
|
|
describing bread-crumb navigation menus. Authors are encouraged to
|
|
just use a series of links in a paragraph. The <code><a href="sections.html#the-nav-element">nav</a></code>
|
|
element can be used to mark the section containing these
|
|
paragraphs as being navigation blocks.</p><div class="example">
|
|
|
|
<p>In the following example, the current page can be reached via
|
|
two paths.</p>
|
|
|
|
<pre><nav>
|
|
<p>
|
|
<a href="/">Main</a> >
|
|
<a href="/products/">Products</a> >
|
|
<a href="/products/dishwashers/">Dishwashers</a> >
|
|
<a>Second hand</a>
|
|
</p>
|
|
<p>
|
|
<a href="/">Main</a> >
|
|
<a href="/second-hand/">Second hand</a> >
|
|
<a>Dishwashers</a>
|
|
</p>
|
|
</nav></pre>
|
|
|
|
</div><h4 id="tag-clouds"><span class="secno">4.13.3 </span>Tag clouds</h4><p id="tag-cloud">This specification does not define any markup
|
|
specifically for marking up lists of keywords that apply to a group
|
|
of pages (also known as <i>tag clouds</i>). In general, authors are
|
|
encouraged to either mark up such lists using <code><a href="grouping-content.html#the-ul-element">ul</a></code>
|
|
elements with explicit inline counts that are then hidden and turned
|
|
into a presentational effect using a style sheet, or to use SVG.</p><div class="example">
|
|
|
|
<p>Here, three tags are included in a short tag cloud:</p>
|
|
|
|
<pre><style>
|
|
@media screen, print, handheld, tv {
|
|
/* should be ignored by non-visual browsers */
|
|
.tag-cloud > li > span { display: none; }
|
|
.tag-cloud > li { display: inline; }
|
|
.tag-cloud-1 { font-size: 0.7em; }
|
|
.tag-cloud-2 { font-size: 0.9em; }
|
|
.tag-cloud-3 { font-size: 1.1em; }
|
|
.tag-cloud-4 { font-size: 1.3em; }
|
|
.tag-cloud-5 { font-size: 1.5em; }
|
|
}
|
|
</style>
|
|
...
|
|
<ul class="tag-cloud">
|
|
<li class="tag-cloud-4"><a title="28 instances" href="/t/apple">apple</a> <span>(popular)</span>
|
|
<li class="tag-cloud-2"><a title="6 instances" href="/t/kiwi">kiwi</a> <span>(rare)</span>
|
|
<li class="tag-cloud-5"><a title="41 instances" href="/t/pear">pear</a> <span>(very popular)</span>
|
|
</ul></pre>
|
|
|
|
<p>The actual frequency of each tag is given using the <code title="attr-title"><a href="elements.html#the-title-attribute">title</a></code> attribute. A CSS style sheet is
|
|
provided to convert the markup into a cloud of differently-sized
|
|
words, but for user agents that do not support CSS or are not
|
|
visual, the markup contains annotations like "(popular)" or
|
|
"(rare)" to categorize the various tags by frequency, thus enabling
|
|
all users to benefit from the information.</p>
|
|
|
|
<p>The <code><a href="grouping-content.html#the-ul-element">ul</a></code> element is used (rather than
|
|
<code><a href="grouping-content.html#the-ol-element">ol</a></code>) because the order is not particularly important:
|
|
while the list is in fact ordered alphabetically, it would convey
|
|
the same information if ordered by, say, the length of the tag.</p>
|
|
|
|
<p>The <code title="rel-tag"><a href="#link-type-tag">tag</a></code> <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code>-keyword is <em>not</em> used
|
|
on these <code><a href="text-level-semantics.html#the-a-element">a</a></code> elements because they do not represent tags
|
|
that apply to the page itself; they are just part of an index
|
|
listing the tags themselves.</p>
|
|
|
|
</div><h4 id="conversations"><span class="secno">4.13.4 </span>Conversations</h4><p>This specification does not define a specific element for marking
|
|
up conversations, meeting minutes, chat transcripts, dialogues in
|
|
screenplays, instant message logs, and other situations where
|
|
different players take turns in discourse.</p><p>Instead, authors are encouraged to mark up conversations using
|
|
<code><a href="grouping-content.html#the-p-element">p</a></code> elements and punctuation. Authors who need to mark
|
|
the speaker for styling purposes are encouraged to use
|
|
<code><a href="text-level-semantics.html#the-span-element">span</a></code> or <code><a href="text-level-semantics.html#the-b-element">b</a></code>. Paragraphs with their text
|
|
wrapped in the <code><a href="text-level-semantics.html#the-i-element">i</a></code> element can be used for marking up
|
|
stage directions.</p><div class="example">
|
|
|
|
<p>This example demonstrates this using an extract from Abbot and
|
|
Costello's famous sketch, <cite>Who's on first</cite>:</p>
|
|
|
|
<pre><p> Costello: Look, you gotta first baseman?
|
|
<p> Abbott: Certainly.
|
|
<p> Costello: Who's playing first?
|
|
<p> Abbott: That's right.
|
|
<p> Costello becomes exasperated.
|
|
<p> Costello: When you pay off the first baseman every month, who gets the money?
|
|
<p> Abbott: Every dollar of it.</pre>
|
|
|
|
</div><div class="example">
|
|
|
|
<p>The following extract shows how an IM conversation log could be
|
|
marked up.</p>
|
|
|
|
<pre><p> <time>14:22</time> <b>egof</b> I'm not that nerdy, I've only seen 30% of the star trek episodes
|
|
<p> <time>14:23</time> <b>kaj</b> if you know what percentage of the star trek episodes you have seen, you are inarguably nerdy
|
|
<p> <time>14:23</time> <b>egof</b> it's unarguably
|
|
<p> <time>14:23</time> <i>* kaj blinks</i>
|
|
<p> <time>14:24</time> <b>kaj</b> you are not helping your case</pre>
|
|
|
|
|
|
</div><h4 id="footnotes"><span class="secno">4.13.5 </span>Footnotes</h4><p>HTML does not have a dedicated mechanism for marking up
|
|
footnotes. Here are the recommended alternatives.</p><hr><p>For short inline annotations, the <code title="attr-title"><a href="elements.html#the-title-attribute">title</a></code> attribute should be used.</p><div class="example">
|
|
|
|
<p>In this example, two parts of a dialogue are annotated with
|
|
footnote-like content using the <code title="attr-title"><a href="elements.html#the-title-attribute">title</a></code> attribute.</p>
|
|
|
|
<pre><p> <b>Customer</b>: Hello! I wish to register a complaint. Hello. Miss?
|
|
<p> <b>Shopkeeper</b>: <strong><span title="Colloquial pronunciation of 'What do you'"</strong>
|
|
>Watcha</span> mean, miss?
|
|
<p> <b>Customer</b>: Uh, I'm sorry, I have a cold. I wish to make a complaint.
|
|
<p> <b>Shopkeeper</b>: Sorry, <span <strong>title="This is, of course, a lie."</strong>>we're
|
|
closing for lunch</span>.</pre>
|
|
|
|
</div><hr><p>For longer annotations, the <code><a href="text-level-semantics.html#the-a-element">a</a></code> element should be
|
|
used, pointing to an element later in the document. The convention
|
|
is that the contents of the link be a number in square brackets.</p><div class="example">
|
|
|
|
<p>In this example, a footnote in the dialogue links to a paragraph
|
|
below the dialogue. The paragraph then reciprocally links back to the
|
|
dialogue, allowing the user to return to the location of the
|
|
footnote.</p>
|
|
|
|
<pre><p> Announcer: Number 16: The <i>hand</i>.
|
|
<p> Interviewer: Good evening. I have with me in the studio tonight
|
|
Mr Norman St John Polevaulter, who for the past few years has been
|
|
contradicting people. Mr Polevaulter, why <em>do</em> you
|
|
contradict people?
|
|
<p> Norman: I don't. <sup><a href="#fn1" id="r1">[1]</a></sup>
|
|
<p> Interviewer: You told me you did!
|
|
<em>...</em>
|
|
<section>
|
|
<p id="fn1"><a href="#r1">[1]</a> This is, naturally, a lie,
|
|
but paradoxically if it were true he could not say so without
|
|
contradicting the interviewer and thus making it false.</p>
|
|
</section></pre>
|
|
|
|
</div><hr><p>For side notes, longer annotations that apply to entire sections
|
|
of the text rather than just specific words or sentences, the
|
|
<code><a href="sections.html#the-aside-element">aside</a></code> element should be used.</p><div class="example">
|
|
|
|
<p>In this example, a sidebar is given after a dialogue, giving it
|
|
some context.</p>
|
|
|
|
<pre><p> <span class="speaker">Customer</span>: I will not buy this record, it is scratched.
|
|
<p> <span class="speaker">Shopkeeper</span>: I'm sorry?
|
|
<p> <span class="speaker">Customer</span>: I will not buy this record, it is scratched.
|
|
<p> <span class="speaker">Shopkeeper</span>: No no no, this's'a tobacconist's.
|
|
<aside>
|
|
<p>In 1970, the British Empire lay in ruins, and foreign
|
|
nationalists frequented the streets — many of them Hungarians
|
|
(not the streets — the foreign nationals). Sadly, Alexander
|
|
Yalt has been publishing incompetently-written phrase books.
|
|
</aside></pre>
|
|
|
|
</div><hr><p>For figures or tables, footnotes can be included in the relevant
|
|
<code><a href="grouping-content.html#the-figcaption-element">figcaption</a></code> or <code><a href="tabular-data.html#the-caption-element">caption</a></code> element, or in
|
|
surrounding prose.</p><div class="example">
|
|
|
|
<p>In this example, a table has cells with footnotes
|
|
that are given in prose. A <code><a href="grouping-content.html#the-figure-element">figure</a></code> element is used to
|
|
give a single legend to the combination of the table and its
|
|
footnotes.</p>
|
|
|
|
<pre><figure>
|
|
<figcaption>Table 1. Alternative activities for knights.</figcaption>
|
|
<table>
|
|
<tr>
|
|
<th> Activity
|
|
<th> Location
|
|
<th> Cost
|
|
<tr>
|
|
<td> Dance
|
|
<td> Wherever possible
|
|
<td> £0<sup><a href="#fn1">1</a></sup>
|
|
<tr>
|
|
<td> Routines, chorus scenes<sup><a href="#fn2">2</a></sup>
|
|
<td> Undisclosed
|
|
<td> Undisclosed
|
|
<tr>
|
|
<td> Dining<sup><a href="#fn3">3</a></sup>
|
|
<td> Camelot
|
|
<td> Cost of ham, jam, and spam<sup><a href="#fn4">4</a></sup>
|
|
</table>
|
|
<p id="fn1">1. Assumed.</p>
|
|
<p id="fn2">2. Footwork impeccable.</p>
|
|
<p id="fn3">3. Quality described as "well".</p>
|
|
<p id="fn4">4. A lot.</p>
|
|
</figure></pre>
|
|
|
|
</div><div class="impl">
|
|
|
|
<h3 id="matching-html-elements-using-selectors"><span class="secno">4.14 </span>Matching HTML elements using selectors</h3>
|
|
|
|
<h4 id="selectors"><span class="secno">4.14.1 </span>Case-sensitivity</h4>
|
|
|
|
<p>Attribute and element <em>names</em> of <a href="infrastructure.html#html-elements">HTML
|
|
elements</a> in <a href="dom.html#html-documents">HTML documents</a> must be treated as
|
|
<a href="infrastructure.html#ascii-case-insensitive">ASCII case-insensitive</a>.</p>
|
|
|
|
<p>Classes from the <code title="attr-class"><a href="elements.html#classes">class</a></code> attribute
|
|
of <a href="infrastructure.html#html-elements">HTML elements</a> in documents that are in <a href="dom.html#quirks-mode">quirks
|
|
mode</a> must be treated as <a href="infrastructure.html#ascii-case-insensitive">ASCII
|
|
case-insensitive</a>.</p>
|
|
|
|
<p>Attribute selectors on an <a href="infrastructure.html#html-elements" title="HTML elements">HTML
|
|
element</a> in an <a href="dom.html#html-documents" title="HTML documents">HTML
|
|
document</a> must treat the <em>values</em> of attributes with
|
|
the following names as <a href="infrastructure.html#ascii-case-insensitive">ASCII case-insensitive</a>, with one
|
|
exception as noted below:</p>
|
|
|
|
|
|
|
|
<ul class="brief"><li><code title="">accept</code>
|
|
</li><li><code title="">accept-charset</code>
|
|
</li><li><code title="">align</code>
|
|
</li><li><code title="">alink</code>
|
|
</li><li><code title="">axis</code>
|
|
</li><li><code title="">bgcolor</code>
|
|
</li><li><code title="">charset</code>
|
|
</li><li><code title="">checked</code>
|
|
</li><li><code title="">clear</code>
|
|
</li><li><code title="">codetype</code>
|
|
</li><li><code title="">color</code>
|
|
</li><li><code title="">compact</code>
|
|
</li><li><code title="">declare</code>
|
|
</li><li><code title="">defer</code>
|
|
</li><li><code title="">dir</code>
|
|
</li><li><code title="">direction</code>
|
|
</li><li><code title="">disabled</code>
|
|
</li><li><code title="">enctype</code>
|
|
</li><li><code title="">face</code>
|
|
</li><li><code title="">frame</code>
|
|
</li><li><code title="">hreflang</code>
|
|
</li><li><code title="">http-equiv</code>
|
|
</li><li><code title="">lang</code>
|
|
</li><li><code title="">language</code>
|
|
</li><li><code title="">link</code>
|
|
</li><li><code title="">media</code>
|
|
</li><li><code title="">method</code>
|
|
</li><li><code title="">multiple</code>
|
|
</li><li><code title="">nohref</code>
|
|
</li><li><code title="">noresize</code>
|
|
</li><li><code title="">noshade</code>
|
|
</li><li><code title="">nowrap</code>
|
|
</li><li><code title="">readonly</code>
|
|
</li><li><code title="">rel</code>
|
|
</li><li><code title="">rev</code>
|
|
</li><li><code title="">rules</code>
|
|
</li><li><code title="">scope</code>
|
|
</li><li><code title="">scrolling</code>
|
|
</li><li><code title="">selected</code>
|
|
</li><li><code title="">shape</code>
|
|
</li><li><code title="">target</code>
|
|
</li><li><code title="">text</code>
|
|
</li><li><code title="">type</code> (except as specified below)
|
|
</li><li><code title="">valign</code>
|
|
</li><li><code title="">valuetype</code>
|
|
</li><li><code title="">vlink</code>
|
|
</li></ul><p>All other attribute values on <a href="infrastructure.html#html-elements">HTML elements</a> must be
|
|
treated as <a href="infrastructure.html#case-sensitive">case-sensitive</a>.</p>
|
|
|
|
<p>The exception to the list above is the <code title="attr-ol-type"><a href="grouping-content.html#attr-ol-type">type</a></code> attribute on <code><a href="grouping-content.html#the-ol-element">ol</a></code>
|
|
elements, which must be treated as <a href="infrastructure.html#case-sensitive">case-sensitive</a>.</p>
|
|
|
|
|
|
<h4 id="pseudo-classes"><span class="secno">4.14.2 </span>Pseudo-classes</h4>
|
|
|
|
<p>There are a number of dynamic selectors that can be used with
|
|
HTML. This section defines when these selectors match HTML
|
|
elements.</p>
|
|
|
|
<dl><dt><dfn id="selector-link" title="selector-link"><code>:link</code></dfn></dt>
|
|
<dt><dfn id="selector-visited" title="selector-visited"><code>:visited</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>All <code><a href="text-level-semantics.html#the-a-element">a</a></code> elements that have an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute, all
|
|
<code><a href="the-map-element.html#the-area-element">area</a></code> elements that have an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute, and all
|
|
<code><a href="semantics.html#the-link-element">link</a></code> elements that have an <code title="attr-link-href"><a href="semantics.html#attr-link-href">href</a></code> attribute, must match one of
|
|
<code title="selector-link"><a href="#selector-link">:link</a></code> and <code title="selector-visited"><a href="#selector-visited">:visited</a></code>.</p>
|
|
|
|
<p>Other specifications might apply more specific rules regarding
|
|
how these elements are to match these pseudo-elements, to mitigate
|
|
some privacy concerns that apply with straightforward
|
|
implementations of this requirement.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt><dfn id="selector-active" title="selector-active"><code>:active</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-active"><a href="#selector-active">:active</a></code> pseudo-class
|
|
is defined to match an element <q cite="http://dev.w3.org/csswg/selectors3/#the-user-action-pseudo-classes-hover-act">while
|
|
an element is <i>being activated</i> by the user</q>. For the
|
|
purposes of defining the <code title="selector-active"><a href="#selector-active">:active</a></code> pseudo-class only, an HTML
|
|
user agent must consider an element as <i>being activated</i> if
|
|
it is:</p>
|
|
|
|
<ul><li>
|
|
|
|
<p>An element falling into one of the following categories
|
|
between the time the user begins to indicate an intent to
|
|
trigger the element's <a href="content-models.html#activation-behavior">activation behavior</a> and
|
|
either the time the user stops indicating an intent to trigger
|
|
the element's <a href="content-models.html#activation-behavior">activation behavior</a>, or the time the
|
|
element's <a href="content-models.html#activation-behavior">activation behavior</a> has finished running,
|
|
which ever comes first:</p>
|
|
|
|
<ul><li><code><a href="text-level-semantics.html#the-a-element">a</a></code> elements that have an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute</li>
|
|
|
|
<li><code><a href="the-map-element.html#the-area-element">area</a></code> elements that have an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute</li>
|
|
|
|
<li><code><a href="semantics.html#the-link-element">link</a></code> elements that have an <code title="attr-link-href"><a href="semantics.html#attr-link-href">href</a></code> attribute</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-button-element">button</a></code> elements that are not <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-input-element.html#the-input-element">input</a></code> elements whose <code title="attr-input-type"><a href="the-input-element.html#attr-input-type">type</a></code> attribute is in the <a href="number-state.html#submit-button-state" title="attr-input-type-submit">Submit Button</a>, <a href="number-state.html#image-button-state" title="attr-input-type-image">Image Button</a>, <a href="number-state.html#reset-button-state" title="attr-input-type-reset">Reset Button</a>, or <a href="number-state.html#button-state" title="attr-input-type-button">Button</a> state</li>
|
|
|
|
<li><code><a href="interactive-elements.html#the-command-element">command</a></code> elements that do not have a <code title="attr-command-disabled"><a href="interactive-elements.html#attr-command-disabled">disabled</a></code> attribute</li>
|
|
|
|
<li>elements that are <a href="editing.html#specially-focusable">specially focusable</a></li>
|
|
|
|
</ul><p class="example">For example, if the user is using a keyboard
|
|
to push a <code><a href="the-button-element.html#the-button-element">button</a></code> element by pressing the space bar,
|
|
the element would match this pseudo-class in between the time
|
|
that the element received the <code title="event-keydown">keydown</code> event and the time the
|
|
element received the <code title="event-keyup">keyup</code>
|
|
event.</p>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<p>An element that the user indicates using a pointing device
|
|
while that pointing device is in the "down" state (e.g. for a
|
|
mouse, between the time the mouse button is pressed and the time
|
|
it is depressed).</p>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<p>An element that has a descendant that is currently matching
|
|
the <code title="selector-active"><a href="#selector-active">:active</a></code>
|
|
pseudo-class.</p>
|
|
|
|
</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-enabled" title="selector-enabled"><code>:enabled</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-enabled"><a href="#selector-enabled">:enabled</a></code> pseudo-class
|
|
must match any element falling into one of the following
|
|
categories:</p>
|
|
|
|
<ul><li><code><a href="text-level-semantics.html#the-a-element">a</a></code> elements that have an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute</li>
|
|
|
|
<li><code><a href="the-map-element.html#the-area-element">area</a></code> elements that have an <code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code> attribute</li>
|
|
|
|
<li><code><a href="semantics.html#the-link-element">link</a></code> elements that have an <code title="attr-link-href"><a href="semantics.html#attr-link-href">href</a></code> attribute</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-button-element">button</a></code> elements that are not <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-input-element.html#the-input-element">input</a></code> elements whose <code title="attr-input-type"><a href="the-input-element.html#attr-input-type">type</a></code> attribute are not in the
|
|
<a href="states-of-the-type-attribute.html#hidden-state" title="attr-input-type-hidden">Hidden</a> state and that
|
|
are not <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-select-element">select</a></code> elements that are not <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-textarea-element">textarea</a></code> elements that are not <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-optgroup-element">optgroup</a></code> elements that are not <span title="concept-optgroup-disabled">disabled</span></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-option-element">option</a></code> elements that are not <a href="the-button-element.html#concept-option-disabled" title="concept-option-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="interactive-elements.html#the-command-element">command</a></code> elements that do not have a <code title="attr-command-disabled"><a href="interactive-elements.html#attr-command-disabled">disabled</a></code> attribute</li>
|
|
|
|
<li><code><a href="grouping-content.html#the-li-element">li</a></code> elements that are children of
|
|
<code><a href="interactive-elements.html#the-menu-element">menu</a></code> elements, and that have a child element that
|
|
defines a <a href="commands.html#concept-command" title="concept-command">command</a>, if the
|
|
first such element's <a href="commands.html#command-facet-disabledstate" title="command-facet-disabledstate">Disabled State</a> facet
|
|
is false (not disabled)</li>
|
|
|
|
<li><code><a href="forms.html#the-fieldset-element">fieldset</a></code> elements that do not have a <code title="attr-fieldset-disabled"><a href="forms.html#attr-fieldset-disabled">disabled</a></code> attribute</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-disabled" title="selector-disabled"><code>:disabled</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-disabled"><a href="#selector-disabled">:disabled</a></code>
|
|
pseudo-class must match any element falling into one of the
|
|
following categories:</p>
|
|
|
|
<ul><li><code><a href="the-button-element.html#the-button-element">button</a></code> elements that are <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-input-element.html#the-input-element">input</a></code> elements whose <code title="attr-input-type"><a href="the-input-element.html#attr-input-type">type</a></code> attribute are not in the
|
|
<a href="states-of-the-type-attribute.html#hidden-state" title="attr-input-type-hidden">Hidden</a> state and that
|
|
are <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-select-element">select</a></code> elements that are <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-textarea-element">textarea</a></code> elements that are <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-optgroup-element">optgroup</a></code> elements that are <span title="concept-optgroup-disabled">disabled</span></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-option-element">option</a></code> elements that are <a href="the-button-element.html#concept-option-disabled" title="concept-option-disabled">disabled</a></li>
|
|
|
|
<li><code><a href="interactive-elements.html#the-command-element">command</a></code> elements that have a <code title="attr-command-disabled"><a href="interactive-elements.html#attr-command-disabled">disabled</a></code> attribute</li>
|
|
|
|
<li><code><a href="grouping-content.html#the-li-element">li</a></code> elements that are children of
|
|
<code><a href="interactive-elements.html#the-menu-element">menu</a></code> elements, and that have a child element that
|
|
defines a <a href="commands.html#concept-command" title="concept-command">command</a>, if the
|
|
first such element's <a href="commands.html#command-facet-disabledstate" title="command-facet-disabledstate">Disabled State</a> facet
|
|
is true (disabled)</li>
|
|
|
|
<li><code><a href="forms.html#the-fieldset-element">fieldset</a></code> elements that have a <code title="attr-fieldset-disabled"><a href="forms.html#attr-fieldset-disabled">disabled</a></code> attribute</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-checked" title="selector-checked"><code>:checked</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-checked"><a href="#selector-checked">:checked</a></code> pseudo-class
|
|
must match any element falling into one of the following
|
|
categories:</p>
|
|
|
|
<ul><li><code><a href="the-input-element.html#the-input-element">input</a></code> elements whose <code title="attr-input-type"><a href="the-input-element.html#attr-input-type">type</a></code> attribute is in the <a href="number-state.html#checkbox-state" title="attr-input-type-checkbox">Checkbox</a> state and whose
|
|
<a href="association-of-controls-and-forms.html#concept-fe-checked" title="concept-fe-checked">checkedness</a> state is
|
|
true</li>
|
|
|
|
<li><code><a href="the-input-element.html#the-input-element">input</a></code> elements whose <code title="attr-input-type"><a href="the-input-element.html#attr-input-type">type</a></code> attribute is in the <a href="number-state.html#radio-button-state" title="attr-input-type-radio">Radio Button</a> state and whose
|
|
<a href="association-of-controls-and-forms.html#concept-fe-checked" title="concept-fe-checked">checkedness</a> state is
|
|
true</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-option-element">option</a></code> elements whose <a href="the-button-element.html#concept-option-selectedness" title="concept-option-selectedness">selectedness</a> is
|
|
true</li>
|
|
|
|
<li><code><a href="interactive-elements.html#the-command-element">command</a></code> elements whose <code title="attr-command-type"><a href="interactive-elements.html#attr-command-type">type</a></code> attribute is in the <a href="interactive-elements.html#attr-command-type-state-checkbox" title="attr-command-type-state-checkbox">Checkbox</a> state
|
|
and that have a <code title="attr-command-checked"><a href="interactive-elements.html#attr-command-checked">checked</a></code>
|
|
attribute</li>
|
|
|
|
<li><code><a href="interactive-elements.html#the-command-element">command</a></code> elements whose <code title="attr-command-type"><a href="interactive-elements.html#attr-command-type">type</a></code> attribute is in the <a href="interactive-elements.html#attr-command-type-state-radio" title="attr-command-type-state-radio">Radio</a> state and that
|
|
have a <code title="attr-command-checked"><a href="interactive-elements.html#attr-command-checked">checked</a></code>
|
|
attribute</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-indeterminate" title="selector-indeterminate"><code>:indeterminate</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
|
|
|
|
<p>The <code title="selector-indeterminate"><a href="#selector-indeterminate">:indeterminate</a></code>
|
|
pseudo-class must match any element falling into one of the
|
|
following categories:</p>
|
|
|
|
<ul><li><code><a href="the-input-element.html#the-input-element">input</a></code> elements whose <code title="attr-input-type"><a href="the-input-element.html#attr-input-type">type</a></code> attribute is in the <a href="number-state.html#checkbox-state" title="attr-input-type-checkbox">Checkbox</a> state and whose
|
|
<code title="dom-input-indeterminate"><a href="the-input-element.html#dom-input-indeterminate">indeterminate</a></code> IDL
|
|
attribute is set to true</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-progress-element">progress</a></code> elements with no <code title="attr-progress-value"><a href="the-button-element.html#attr-progress-value">value</a></code> content attribute</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-default" title="selector-default"><code>:default</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-default"><a href="#selector-default">:default</a></code> pseudo-class
|
|
must match any element falling into one of the following
|
|
categories:</p>
|
|
|
|
<ul><li><code><a href="the-button-element.html#the-button-element">button</a></code> elements that are their form's
|
|
<a href="association-of-controls-and-forms.html#default-button">default button</a></li>
|
|
|
|
<li><code><a href="the-input-element.html#the-input-element">input</a></code> elements whose <code title="attr-input-type"><a href="the-input-element.html#attr-input-type">type</a></code> attribute is in the <a href="number-state.html#submit-button-state" title="attr-input-type-submit">Submit Button</a> or <a href="number-state.html#image-button-state" title="attr-input-type-image">Image Button</a> state, and that
|
|
are their form's <a href="association-of-controls-and-forms.html#default-button">default button</a></li>
|
|
|
|
<li><code><a href="the-input-element.html#the-input-element">input</a></code> elements to which the <code title="attr-input-checked"><a href="the-input-element.html#attr-input-checked">checked</a></code> attribute applies and
|
|
that have a <code title="attr-input-checked"><a href="the-input-element.html#attr-input-checked">checked</a></code>
|
|
attribute</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-option-element">option</a></code> elements that have a <code title="attr-option-selected"><a href="the-button-element.html#attr-option-selected">selected</a></code> attribute</li>
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-valid" title="selector-valid"><code>:valid</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-valid"><a href="#selector-valid">:valid</a></code> pseudo-class
|
|
must match all elements that are <a href="association-of-controls-and-forms.html#candidate-for-constraint-validation" title="candidate for
|
|
constraint validation">candidates for constraint validation</a>
|
|
and that <a href="association-of-controls-and-forms.html#concept-fv-valid" title="concept-fv-valid">satisfy their
|
|
constraints</a>.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt><dfn id="selector-invalid" title="selector-invalid"><code>:invalid</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-invalid"><a href="#selector-invalid">:invalid</a></code> pseudo-class
|
|
must match all elements that are <a href="association-of-controls-and-forms.html#candidate-for-constraint-validation" title="candidate for
|
|
constraint validation">candidates for constraint validation</a>
|
|
but that do not <a href="association-of-controls-and-forms.html#concept-fv-valid" title="concept-fv-valid">satisfy their
|
|
constraints</a>.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt><dfn id="selector-in-range" title="selector-in-range"><code>:in-range</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-in-range"><a href="#selector-in-range">:in-range</a></code>
|
|
pseudo-class must match all elements that are <a href="association-of-controls-and-forms.html#candidate-for-constraint-validation" title="candidate for constraint validation">candidates for
|
|
constraint validation</a>, <a href="common-input-element-attributes.html#have-range-limitations">have range limitations</a>,
|
|
and that are neither <a href="association-of-controls-and-forms.html#suffering-from-an-underflow">suffering from an underflow</a> nor
|
|
<a href="association-of-controls-and-forms.html#suffering-from-an-overflow">suffering from an overflow</a>.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt><dfn id="selector-out-of-range" title="selector-out-of-range"><code>:out-of-range</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-out-of-range"><a href="#selector-out-of-range">:out-of-range</a></code>
|
|
pseudo-class must match all elements that are <a href="association-of-controls-and-forms.html#candidate-for-constraint-validation" title="candidate for constraint validation">candidates for
|
|
constraint validation</a>, <a href="common-input-element-attributes.html#have-range-limitations">have range limitations</a>,
|
|
and that are either <a href="association-of-controls-and-forms.html#suffering-from-an-underflow">suffering from an underflow</a> or
|
|
<a href="association-of-controls-and-forms.html#suffering-from-an-overflow">suffering from an overflow</a>.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt><dfn id="selector-required" title="selector-required"><code>:required</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-required"><a href="#selector-required">:required</a></code>
|
|
pseudo-class must match any element falling into one of the
|
|
following categories:</p>
|
|
|
|
<ul><li><code><a href="the-input-element.html#the-input-element">input</a></code> elements that are <i title="concept-input-required"><a href="common-input-element-attributes.html#concept-input-required">required</a></i></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-select-element">select</a></code> elements that have a <code title="attr-select-required"><a href="the-button-element.html#attr-select-required">required</a></code>
|
|
attribute</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-textarea-element">textarea</a></code> elements that have a <code title="attr-textarea-required"><a href="the-button-element.html#attr-textarea-required">required</a></code>
|
|
attribute</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-optional" title="selector-optional"><code>:optional</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-optional"><a href="#selector-optional">:optional</a></code>
|
|
pseudo-class must match any element falling into one of the
|
|
following categories:</p>
|
|
|
|
<ul><li><code><a href="the-input-element.html#the-input-element">input</a></code> elements to which the <code title="attr-input-required"><a href="common-input-element-attributes.html#attr-input-required">required</a></code> attribute applies
|
|
that are not <i title="concept-input-required"><a href="common-input-element-attributes.html#concept-input-required">required</a></i></li>
|
|
|
|
<li><code><a href="the-button-element.html#the-select-element">select</a></code> elements that do not have a <code title="attr-select-required"><a href="the-button-element.html#attr-select-required">required</a></code> attribute</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-textarea-element">textarea</a></code> elements that do not have a <code title="attr-textarea-required"><a href="the-button-element.html#attr-textarea-required">required</a></code>
|
|
attribute</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
<dt><dfn id="selector-read-only" title="selector-read-only"><code>:read-only</code></dfn></dt>
|
|
<dt><dfn id="selector-read-write" title="selector-read-write"><code>:read-write</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-read-write"><a href="#selector-read-write">:read-write</a></code>
|
|
pseudo-class must match any element falling into one of the
|
|
following categories:</p>
|
|
|
|
<ul><li><code><a href="the-input-element.html#the-input-element">input</a></code> elements to which the <code title="attr-input-readonly"><a href="common-input-element-attributes.html#attr-input-readonly">readonly</a></code> attribute applies,
|
|
but that are not <i title="concept-input-immutable"><a href="the-input-element.html#concept-input-immutable">immutable</a></i>
|
|
(i.e. that do not have the <code title="attr-input-readonly"><a href="common-input-element-attributes.html#attr-input-readonly">readonly</a></code> attribute specified
|
|
and that are not <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a>)</li>
|
|
|
|
<li><code><a href="the-button-element.html#the-textarea-element">textarea</a></code> elements that do not have a <code title="attr-textarea-readonly"><a href="the-button-element.html#attr-textarea-readonly">readonly</a></code> attribute, and
|
|
that are not <a href="association-of-controls-and-forms.html#concept-fe-disabled" title="concept-fe-disabled">disabled</a></li>
|
|
|
|
<li>elements that are <a href="editing.html#editable">editable</a> and are neither
|
|
<code><a href="the-input-element.html#the-input-element">input</a></code> elemenst nor <code><a href="the-button-element.html#the-textarea-element">textarea</a></code>
|
|
elements</li>
|
|
|
|
</ul><p>The <code title="selector-read-only"><a href="#selector-read-only">:read-only</a></code>
|
|
pseudo-class must match all other <a href="infrastructure.html#html-elements">HTML elements</a>.</p>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt><dfn id="selector-ltr" title="selector-ltr"><code>:ltr</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-ltr"><a href="#selector-ltr">:ltr</a></code> pseudo-class must
|
|
match all elements whose <a href="elements.html#the-directionality" title="the
|
|
directionality">directionality</a> is '<a href="elements.html#concept-ltr" title="concept-ltr">ltr</a>'.</p>
|
|
|
|
</dd>
|
|
|
|
<dt><dfn id="selector-rtl" title="selector-rtl"><code>:rtl</code></dfn></dt>
|
|
|
|
<dd>
|
|
|
|
<p>The <code title="selector-rtl"><a href="#selector-rtl">:rtl</a></code> pseudo-class must
|
|
match all elements whose <a href="elements.html#the-directionality" title="the
|
|
directionality">directionality</a> is '<a href="elements.html#concept-rtl" title="concept-rtl">rtl</a>'.</p>
|
|
|
|
</dd>
|
|
|
|
</dl><p class="note">Another section of this specification defines the
|
|
<i><a href="history.html#target-element">target element</a></i> used with the <code title="selector-target">:target</code> pseudo-class.</p>
|
|
|
|
<p class="note">This specification does not define when an element
|
|
matches the <code title="selector-hover">:hover</code>, <code title="selector-focus">:focus</code>, or <code title="selector-lang()">:lang()</code> dynamic pseudo-classes, as
|
|
those are all defined in sufficient detail in a language-agnostic
|
|
fashion in the Selectors specification. <a href="references.html#refsSELECTORS">[SELECTORS]</a></p>
|
|
|
|
</div></body></html>
|