Page 76 - Trackpad_V1_Book 6_Flipbook
P. 76

Syntax to specify the attribute of any tag:
                   <tag_name attribute_name = “value”>.

                  For example, the <FONT> tag has a COLOR attribute, which allows changing the colour of the text.
                  <FONT COLOR = “#FF00FF”>




                            HTML COMMENTS

                  Comments  are used  to  write notes  about  the concerned  HTML  document.  This helps the
                  programmer in editing the document later. Any program description can be added in the form of
                  comments. We can add comments in our program using a comment tag <!-- -->.

                  For example, <!-- This is a comment in HTML -->




                            RULES FOR WRITING HTML CODES

                  There are some rules for writing HTML codes:

                      Container tags should always be closed properly.
                      Values given to the attributes should be enclosed within the double-quotes.
                      Tag name should not contain spaces.
                      There should be no space between < and > in a tag.

                      Tags must be nested correctly.



                            STRUCTURE OF AN HTML DOCUMENT


                  The structure of an HTML page is:


                   <!DOCTYPE HTML>
                   <HTML>
                     <HEAD>
                       <TITLE> The title of the webpage goes here. </TITLE>
                     </HEAD>


                     <BODY>
                        All  the  visible  content  of  the  webpage  is  documented  here,
                          containing  bulk  of  information.  The section  contains  various
                          HTML tags defining the structure and layout of the page content.
                     </BODY>
                   </HTML>

                  The DOCTYPE declaration at the beginning of our page specifies that the document is written in
                  HTML5. In HTML5, the DOCTYPE declaration is required.




                   74   Trackpad (Version 1.0)-VI
   71   72   73   74   75   76   77   78   79   80   81