HTML and CSS Reference
In-Depth Information
appendix
b
HTML Elements Index
THIS APPENDIX CONTAINS
a list of the most commonly used HTML elements with definitions and examples for
each of these elements. Note that I cover only the basic attributes for each of the elements here. For an exhaustive list
of elements and their attributes check out the HTML5 specifications that can be found here:
•
WHATWG Specification -
http://developers.whatwg.org/
•
W3C Specification -
http://www.w3.org/TR/html5/
Element
Definition
The
<a>
element is used for creating hyperlinks to other pages on the web or to a section in the current
page. The location of the target page is specified in the
href
attribute. The
anchor text
between the
tags will be shown to the user.
<a>
<a href=”http://html5foundations.com”>HTML5 Foundations</a>
The
<abbr>
element is used to markup an abbreviation or acronym. An optional
title
attribute may
be used to specify an expansion of the abbreviation.
<abbr>
<abbr title=”World Wide Web Consortium”>W3C</abbr>
The
<address>
element should contain contact information for a section or page.
<address>
<a href=”mailto:matt.west@developercity.co.uk”>
Email Matt
</a>
</address>
<address>
The
<article>
element is used to define a section on a page that contains an independent piece of
content such as a blog post or newspaper article.
<article>
<article>
<h1>Blog Post Title</h1>
<p>Blog post content...</p>
</article>
If the
<aside>
element is used within an
<article>
element, it should contain content that is related
to the article, but that could also be considered separate from it. In this context the
<aside>
element is
similar to the purpose of a sidebar in a printed book or magazine article.
If the
<aside>
element is not used within an
<article>
element it should contain content that is re-
lated to the page, but that again, could be considered separate from it. For example, this could be a
sidebar containing links to related websites.
<aside>
<article>
<h1>HTML5 Elements</h1>
<p>Some content goes here...</p>