Second, the basic HTML syntax

Source: Internet
Author: User

    • Basic structure and rules of 1,xhtml
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

Attention:

1, to develop a good habit, in the future when we write empty labels, to the slash (/) before adding a space, such as <br/>

2, all attribute names for all elements should be lowercase, all attributes must specify attribute values, do not abbreviate, and all attribute values are quoted.


    • 2,xhtml using DTDs to specify semantic constraints
The DTD information should be added at the beginning of the XHTML document, which is a necessary part of the XHTML document, so we should have a DTD for writing a standard HTML document. For example: <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >


There are three types of XHTML documents:
STRICT (Strict type): Requires clean labeling to avoid confusion in performance. Used in conjunction with CSS in general.
Transitional (Transition type): When you need to take advantage of HTML performance features, and when you need to write XHTML for browsers that do not support cascading style sheets.
FRAMESET (frame type): When the browser window needs to be split into two or more frames using the HTML framework.
1,xhtml 1.0 Strict:
<! DOCTYPE htmlpublic "-//w3c//dtd XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
2,xhtml 1.0 Transitional:
<! DOCTYPE htmlpublic "-//w3c//dtd XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
3,xhtml 1.0 frameset<! DOCTYPE html
Public "-//W3C//DTD XHTML 1.0 frameset//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" >


Second, the basic HTML syntax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.