Page 28 - DCAP202_Fundamentals of Web Programming
P. 28

Unit 2: HTML Introduction




          Tags are instructions that are embedded directly into the text of a HTML document. Each HTML  Notes
          tag describes that the browser should do something instead of simply displaying the text. In
          HTML, the tags begin with (<) and end with (>) HTML tags can be of two types. They are
          1.   Paired Tags
          2.   Unpaired Tags

          2.4.1 Container or Paired Tag

          A tag is said to be a paired tag if the text is placed between a tag and its companion tag. In paired
          tags, the first tag is referred to as Opening Tag and the second tag is referred to as Closing Tag.


                 Example: <i>This text is in italics. </i>




             Notes  Here <i> is called opening tag. and </i> is called closing tag.

          2.4.2 Empty or Singular Tags

          An unpaired tag does not have a companion tag. Unpaired tags are also known as  Singular or
          Stand-Alone Tags.


                 Example: <br> , <hr>, etc. These tags does not require any companion tag.




              Task  Compare and contrast container tags and singular tags.

          Self Assessment

          Fill in the blanks:
          12.  ........................... are instructions that are embedded  directly into the text  of a  HTML
               document.
          13.  In paired tags, the first tag is referred to as Opening Tag and the second tag is referred to
               as ........................... Tag.
          14.  A tag is said to be a ........................... tag if the text is placed between a tag and its companion
               tag.

          15.  Unpaired tags are also known as ........................... Tags.
          2.5 Summary


              A markup language is a language that annotates text so that the computer can manipulate
               the text.

              Most markup languages are human readable because the annotations are written in a way
               to distinguish them from the text.

              The HTML is the widely used language for writing web pages.




                                           LOVELY PROFESSIONAL UNIVERSITY                                   21
   23   24   25   26   27   28   29   30   31   32   33