An XHTML document has three main parts:
The basic document structure is as follows:
<!DOCTYPE ...><html><head><title>... </title></head><body> ... </body></html>
In an XHTML document, the document type declaration is always on the first line.
This is a simple (minimized) XHTML document:
<!DOCTYPE htmlPUBLIC -//W3C//DTD XHTML 1.0 Strict//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd><html><head><title>simple document</title></head><body><p>a simple paragraph</p></body></html>
Document type declaration defines the type of the document:
<!DOCTYPE htmlPUBLIC -//W3C//DTD XHTML 1.0 Strict//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
The rest of the document is similar to HTML:
<html><head><title>simple document</title></head><body><p>a simple paragraph</p></body></html>
<!DOCTYPE htmlPUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/ xhtml1-strict.dtd >Use in such cases: Clean marking is required to avoid performance confusion. Please use it with the cascading style sheet.
<!DOCTYPE htmlPUBLIC -//W3C//DTD XHTML 1.0 Transitional//ENhttp://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd >Use in such cases: when it is necessary to take advantage of the performance characteristics of HTML, and when it is necessary to write XHTML for those browsers that do not support cascading style sheets.
<!DOCTYPE htmlPUBLIC -//W3C//DTD XHTML 1.0 Frameset//ENhttp://www.w3.org/TR/xhtml1/DTD/ xhtml1-frameset.dtd >In such cases, when using HTML frameworks, you need to split the browser window into two or more frames. 2 pages in total Previous page 12 Next page