View on GitHub

reading-notes

HTML extra Markup

Each new version of HTML was designed to be an improvement on the last (with new elements and attributes added and older code removed).

DOCTYPE

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 ©.

HTML5 layout elements

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

HTML5 introduces a new set

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 <header> and <footer> elements can be used for:

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.