Each new version of HTML was designed to be an improvement on the last (with new elements and attributes added and older code removed).
Because there have been several versions of HTML, each web page should begin with a DOCTYPE declaration to tell a browser which version of HTML the page is using (although browsers usually display the page even if it is not included). We will therefore be including one in each example for the rest of the book.
Every HTML element can carry the id attribute. It is used to uniquely identify that element from other elements on the page. Its value should start with a letter or an underscore (not a number or any other character). It is important that no two elements on the same page have the same value for their id attributes (otherwise the value is no longer unique).
DOCTYPES tell browsers which version of HTML you are using.
You can add comments to your code between the markers.
he id and class attributes allow you to identify particular elements.
The elements allow you to group block-level and inline elements together.
cut windows into your web pages through which other pages can be displayed.
The tag allows you to supply all kinds of information about your web page.
Escape characters are used to include special characters in your pages such as <, >, and ©.
is introducing a new set of elements that help define the structure of a page. These new elements are going to play an important part in creating layouts going forward
of elements that allow you to divide up the parts of a page. The names of these elements indicate the kind of content you will find in them. They are still subject to change, but that has not stopped many web page authors using them already why? The point of creating these new elements is so that web page authors can use them to help describe the structure of the page. The
and elements can be used for:-
The main header or footer that appears at the top or bottom of every page on thesite.
-
A header or footer for an individual article or section within the page.
-
The nav element is used to contain the major navigational blocks on the site such as theprimary site navigation.
-
The article element acts as a container for any section of a page that could stand alone and potentially be syndicated.
-
The aside element has two purposes, depending on whether it is inside an
element or not. -Theelement groups related content together, and typically each section would have its own heading. -
The purpose of the hgroup element is to group together a set of one or more h1 through h6 elements so that they are treated as one single heading.
element in Chapter 5 when we looked at images. It can be used to contain any content that is referenced from the main flow of an article (not just images). -However, the div element will remain an important way to group together related elements, because you should not be using these new elements that you have just met for purposes other than those explicitly stated.