Tài liệu Creating (X)HTML Document Structure

Thảo luận trong 'Thiết Kế Web' bắt đầu bởi Thúy Viết Bài, 5/12/13.

  1. Thúy Viết Bài

    Thành viên vàng

    Bài viết:
    198,891
    Được thích:
    173
    Điểm thành tích:
    0
    Xu:
    0Xu
    Although a basic document structure is a requirement for every (X)HTML
    document, creating it over and over again can get monotonous. Most
    (X)HTML-editing tools set up basic document structure automatically whenever
    you create a new document.
    Labeling Your (X)HTML Document
    First up in any (X)HTML document sits a Document Type Declaration (DTD),
    or DOCTYPE declaration. This line of markup specifies which version of HTML
    or XHTML you’re using and also lets browsers know how to interpret what
    follows. We use the XHTML 1.0 specification in this chapter because that’s
    what most browsers and editing tools expect to see.
    Adding an HTML DOCTYPE declaration
    If you choose to create an HTML 4.01 document instead of an XHTML document,
    you can pick from three possible DOCTYPE declarations:
    ✓ HTML 4.01 Transitional: This is the most inclusive version of HTML
    4.01, and it incorporates all HTML structural elements as well as all presentation
    elements:
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
    “http://www.w3.org/TR/html4/loose.dtd”>
    ✓ HTML 4.01 Strict: This streamlined version of HTML excludes all presentation-
    related elements in favor of style sheets as the means to drive
    page display:
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
    “http://www.w3.org/TR/html4/strict.dtd”>
     

    Các file đính kèm:

Đang tải...