tailieunhanh - HTML cơ bản - p 10
74 Chapter 2: The HTML Language content can be placed in a section element without having to reduce all the headings by one level. Remember, there should be only one level-one heading on a page. The exception to this rule is when a page is composed of multiple sections. In that case, each section is allowed to retain the level-one heading it would have when published on its own. Although a section element may contain other sections, a section’s parent element should only be another section or the body element. It would be incorrect to have a section inside a division. Also. | 74 Chapter 2 The HTML Language content can be placed in a section element without having to reduce all the headings by one level. Remember there should be only one level-one heading on a page. The exception to this rule is when a page is composed of multiple sections. In that case each section is allowed to retain the level-one heading it would have when published on its own. Although a section element may contain other sections a section s parent element should only be another section or the body element. It would be incorrect to have a section inside a division. Also in HTML5 a number of elements behave as divisions but actually provide specific semantic meaning for robots and other HTML processors. The arti cl e element arti cl e arti cl e should be used when marking up content that is article-like such as the posts on a blog or the articles in an online magazine. Like the section element an article element can contain all markup that would be appropriate if the article was published on a page by itself including a single address element with authorship information. Unlike the section element an article should not be nested inside another article. Similarly the navigation nav nav header header header and footer footer footer elements are semantic markup intended to provide more information for search robots and other nonhuman readers than can be gleaned from division elements. To illustrate consider a web page using division elements with id and class attributes to define the various parts of the page. Example shows the HTML. Figure shows how this page appears in a browser. Example HTML divisions DOCTYPE html html head title Example title style type text css body padding 0 36px hl font-family sans-serif padding-top 60px header margin-bottom 36px header img float left header a text-decoration none top-menu bottom-menu margin-left -36px From the Library of Wow eBook Block Elements 75 top-menu li float left padding 5px border 1px solid .
đang nạp các trang xem trước