Ans : The previous section discussed rules for writing XHTML/HTML. In this section, you will learn about the structure of the document. Each document is structured into two parts, the HEAD, and the BODY. The head contains information about the document whereas the body contains the body of the text, and is where you place the document content to be displayed. Both of these are contained within the HTML element.
Three features in figure 19.0 are characteristic of XHTML/HTML5 documents.
1. Every XHTML document must begin with an XML declaration. All XML documents should begin with the following line: <?xml version =”1.0” encoding = “utf-8” ?>
This declaration states that the rest of the document is XML. The version attribute
specify the version number, which is still 1.0. The encoding property defines the
encoding in which the document is stored on a computer.
In HTML5, every document must begin with <!DOCTYPE HTML>
2. XHTML documents require a DOCTYPE declaration just after the XML declaration.
A DOCTYPE declaration is the XML mechanism for specifying the document type
declaration (DTD) relevant to the document. The DTD specifies the rules used by the
markup language. You will learn more about the XML and DTD in the unit 3 of this
block.
3. XHTML document must include the four main tags <html><head><title> & <body>
0 टिप्पणियाँ:
Post a Comment