New Event


sargodha-universityPrior to HTML5, you could divide a web page or site into various areas using the <div>
tag. The <div> tag was often used to set off an area of a page or site for a header, footer, or
a left or right column to provide a container for specific information in that area. HTML5
provides six additional tags, listed in Table 2-12, to section or identify containers on a
page. In and of themselves, these tags do not provide placement or alignment on a page;
you must do that separately with CSS styling (see Chapter 3). They simply provide
identification of an area of a page for the script creator or reader. You can use these tags
multiple times on a page or site, and they can be nested inside one another. For example, a
page with a header and/or footer can have several article containers with their own header
and/or footer, as shown in Figure 2-13. The new sectioning tags do not have their own
attributes, but they make heavy use of the global attributes class, id, style, and title.
Listing 2-10 shows a possible way the script might be laid out to provide the start of what
you see in Figure 2-13, but remember that you will need to use styles discussed in the next
chapter to get the actual layout in Figure 2-13; otherwise, it will look like the illustration
on the right.

Leave a Reply

Your email address will not be published. Required fields are marked *