Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 110 - 2617_JSSPS_C-6
P. 110

    RULES FOR WRITING HTML5 CODES

                  There are certain rules for writing HTML5 codes. Let us learn more about them:

                      Container tags should always be closed properly.
                      Values given to the attributes should be enclosed within double quotes.

                      The tag name should not contain spaces.
                      There should be no spaces between < and > in a tag.

                      Tags must be nested correctly using the LIFO principle.

                  HTML5 DOCUMENT STRUCTURE

                  An HTML document is a text file containing markup tags. The markup tags tell the Web browser how to

                  display the web page. An HTML file is saved with .htm or .html extension.
                  Basic Structure of HTML Document is as follows:

                  <!DOCTYPE html>
                  <html>
                  <head>

                  <title>Title of the web page</title>
                  </head>
                  <body>

                  Content of the page
                  </body>

                  </html>
                  An HTML page is divided into two sections called Head and Body.
                       Head contains the information about the document, such as the title of the page, links to stylesheets,

                     and other data that is not directly visible to the user on the web page.
                       Body contains the information which is to be shown on the web page.

                  HTML provides various tags such as <!DOCTYPE html>, <HTML>, <HEAD>, <TITLE>, <BODY>, and many
                  more. Let us discuss some tags in detail.

                  The <!DOCTYPE html> Tag

                  The <!DOCTYPE html> is not an element in HTML. It is a document type declaration that tells the browser
                  about the version of HTML. It is not case-sensitive which means you can write it into uppercase or
                  lowercase.

                  The <HTML> Tag

                  The <html> tag tells the web browser that the text contained between <html> and </html> is a web
                  page and can be viewed using a web browser (Google Chrome, Microsoft Edge, Mozilla Firefox etc.).
                  Every web page coding must start with the <html> tag and end with the </html> tag.

                    108     Premium Edition-VI

| 105 106 107 108 109 110 111 112 113 114 115 |