Page 82 - TP_Prime_v2.2_Class_6
P. 82

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
           Prime (Ver. 2.2)-VI  Nesting of tags means that you can start a new tag before closing the previous tag. The
                    <sup>, Italic <i>, Subscript <sub>, etc.


                    Nesting of Tags




                  key point to remember is that tags are nested based on the LIFO principle, that is, Last
                  In First Out. This means that the tag that has been opened last needs to be closed first.


          80      For example: <body> <h1> Happy Coding ! </h1> </body>
                    Attribute


                  An attribute is a property that provides additional information about a tag. It enhances
                  the  functionality  of  a  tag.  It  is  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.




                    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.





                                    Suppose, writing HTML5 code was like casting a spell. What kind of digital spells
                                    would you create, and what effects would they have on your web page?
   77   78   79   80   81   82   83   84   85   86   87