2. Html basic syntax_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:45:16
Original
1205 people have browsed it

  • 1. Basic structure and rules of XHTML
  • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head></head><body></body></html>
    Copy after login

    Note:

    1. We must develop good habits. When we write empty tags in the future, we must add a space before the slash (/), such as

    2, all attribute names of all elements should be lowercase, all attributes must specify attribute values, no abbreviations, and all attribute values ​​must be enclosed in quotes.


  • 2. XHTML uses DTD to specify semantic constraints
  • DTD information should be added at the beginning of the XHTML document. It is a must for the XHTML document. part, so we write a standard html document that should have a DTD. For example:


    There are three XHTML document types:
    STRICT (strict type): Clean markup is required to avoid clutter in performance. Generally used in conjunction with CSS.
    TRANSITIONAL: When you need to take advantage of the presentational features of HTML and when you need to write XHTML for browsers that do not support cascading style sheets.
    FRAMESET (frame type): When you need to use HTML frames to split the browser window into two or more frames.
    1, XHTML 1.0 Strict:
    <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    Copy after login
    2, XHTML 1.0 Transitional:
    <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Copy after login
    3, >
    Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!