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, >