HTML and CSS Reference
In-Depth Information
There are many new changes to the HTML5 spec, but for this chapter, we will
focus on the changes that are applicable to mobile.
The changes in the HTML5 spec will be apparent in code examples provided.
But you may ask yourself, what's the point? Your users will see the same thing
regardless of whether you use the new HTML5 elements. There are several
reasons why making this change will have an impact on your users.
You can produce cleaner code that is easier to maintain.
Machine consumers will have an easier time reading and
understanding your code. Machines include search engine
bots, browser plugins, and features that rely on understanding
how your document's content is structured.
You don't have to define as many classes and IDs within your
document. You can rely more on the cascade to do much of
the work for you.
NOTE: Although the examples do not show <body /> , <html /> , or
<head /> tags, all elements can be placed within the body of the
document unless otherwise specified.
<article />
The <article /> element is used to represent independent content on a page,
such as a blog post, news article, or comment. In principle, an article should
contain its own header, content, and footer. You may also nest information
about the article's author within the element. You can also nest article elements
within another article element to help further structure content such as article
comments.
Figure 3-2 shows where an <article /> element may be placed in relation to an
HTML5 document. Listing 3-1 shows the structure of some basic HTML5
elements, and where the <article /> element fits into this hierarchy.
 
Search WWH ::




Custom Search