Page 75 - Plus V4 with Adobe class 6
P. 75

The HTML tags can be categorised as:
               Container Tags: The tags that have both opening and closing tags are called Container Tags.

               For example       <b> ...... </b>
                                       <head> ...... </head>

                Empty Tags: Empty tags contain only opening tag. They do not have closing tag. These tags do not
               enclose any data.
               For example       <br>, <hr>, etc.
            HTML tags can also be further classified as:

                Block Level Tags: The block level tags take up the full width available and by default begin on a new
               line. Some of the block level tags are Paragraph <P>, headings <H1> to <H6>, Horizontal Rule <HR>, etc.
                Text Level Tags: The text level tags are used to mark up parts of the text. These tags do not start
               with a new line. Some of the text level tags are Bold <B>, Superscript <sup>, Italic <i>, Subscript
               <sub>, etc.

            Nesting of Tags

            Nesting of tags means that you can start a new tag before closing the previous tag. The only point to
            remember is that tags are nested on LIFO principle, that is, Last In First Out. This means that the tag
            that has been opened last needs to be closed first.

            Attribute

            An attribute is a property that provides some additional information about a tag. It enhances the
            functionality of a tag. It always specified inside the opening tag. All attributes consist of two parts—a
            name and a value.

            The ‘name’ is the property that you want to set.

            The ‘value’ is what you want for the respective property.

            For example          <body bgcolor="yellow">
            The bgcolor attribute of the <body> tag is used to add a background colour to the body of the web page.

            For example           <hr width="50%">

            The Width is the attribute of the <hr> tag which specifies the width of the horizontal line in pixels or
            percentage. By default, the width is 100%.


                 RULES FOR WRITING HTML5 CODES

            There are certain rules for writing HTML5 codes. Lets us learn more about them:
               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 spaces between < and > in a tag.

               Tags must be nested correctly.



                                                                                  #Introduction to  HTML5 & CSS3  73
   70   71   72   73   74   75   76   77   78   79   80