Page 74 - Trackpad_V5_Book 6
P. 74

Syntax to specify the attribute of any tag:
                                                                                                                                       <tag_name attribute_name = “value”>.
                 Tick ( ) if you know this.
                                                                                                                                      For example, the <HR> tag has a COLOR attribute, which allows changing the colour of the line.
                     HTML or Hypertext Markup Language is the primary building block for creating a webpage.
                                                                                                                                      <HR COLOR = “RED”>
                    Tags that have both opening and closing tags are known as container tags.


                                                                                                                                                HTML COMMENTS
            NESTING OF TAGS
            Nesting of tags means that you can start a new tag before closing the previous tag. These tags                            Comments  are used  to  write notes  about  the concerned  HTML  document.  This helps the
            are nested on the LIFO principle, which is Last In First Out. It means the tag that has been opened                       programmer in editing the document later. Any program description can be added in the form of
            last needs to be closed first.                                                                                            comments. We can add comments in our program using a comment tag <!--  -->.




                       BASIC HTML TAGS                                                                                                          RULES FOR WRITING HTML CODES


            Let’s learn the basic tags of HTML.                                                                                       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.
                      Tags                                      Description
                                                                                                                                         Tag name should not contain spaces.
                                                                                                                                         There should be no space between < and > in a tag.
                                       The <HTML> tag tells the web browser that the text contained between <HTML>
                     <HTML>                                                                                                              Tags must be nested correctly.
                                       and </HTML> is a web page and can be viewed using a web browser.

                                       The <HEAD> tag represents the header area of the document. It
                    <HEAD>             contains information about the document title, scripts and style                                         STRUCTURE OF AN HTML DOCUMENT
                                       definitions used in the document.                                                              The structure of an HTML page is:

                                       The <TITLE> tag represents the title of the document and is used inside the
                                                                                                                                       <!DOCTYPE HTML>
                     <TITLE>           <HEAD> tag. It appears on the title bar of the browser window. If you do not
                                                                                                                                       <HTML>
                                       want to give title to your web page, you can skip it.
                                                                                                                                         <HEAD>
                                       The <BODY> tag defines that section of the HTML document which is visible on                        <TITLE> The title of the webpage goes here. </TITLE>
                                       the web browser. It contains all other tags that define the content presentation                  </HEAD>
                    <BODY>
                                       elements such as images, lists, tables, text and links to move between the
                                       webpages.                                                                                         <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.
                       ATTRIBUTES                                                                                                        </BODY>

                                                                                                                                       </HTML>
            An attribute is used to define some extra features or properties of an HTML tag. All attributes
            have two parts: name and value. The ‘name’ is the property that you want to set. The ‘value’ is                           The DOCTYPE declaration at the beginning of our page specifies that the document is written in
            what you want for the respective name.                                                                                    HTML5. In HTML5, the DOCTYPE declaration is required.



             72   Pro (Ver. 5.0)-VI
   69   70   71   72   73   74   75   76   77   78   79