Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 11 - 2615_KEC
P. 11

    UNDERSTANDING HTML5 TAGS

                     An HTML document is made up of various tags or elements. A tag is a coded HTML instruction that
                     indicates how a part of the document will be displayed in the web browser. Each tag, which gives
                     specific instructions, is enclosed within angular brackets < >. HTML tags tell the web browser how
                     to organise and display text, images and other content.

                                               <TagName> content </TagName>

                                                Opening tag                    Closing tag

                     Most  of the  tags  in  HTML have opening  and  closing  tags.  A  combination  of the  opening  tag,
                     content and closing tag is called an element. We can write HTML tags in uppercase as well as
                     lowercase. The HTML tags can be categorised as: container and empty.

                     CONTAINER TAGS

                     Most tags in HTML come in pairs, meaning they have both an opening and a closing tag. The
                     closing tag is created by adding a forward slash (/) before the tag name.
                     For example: <HTML> ... </HTML>

                     The content or effects of the tag apply to everything between the opening and closing tags.

                     EMPTY TAGS

                     These tags are self-contained. They have only an opening tag.
                     For example: <BR>.
                     The Line Break tag is an empty tag that does not require any corresponding closing tag.

                          Tick ( ) if you know this.

                              HTML is the primary building block for creating a webpage.

                             Tags that have both opening and closing tags are known as container tags.

                     NESTING OF TAGS
                     Nesting of tags means that you can place a new tag inside another tag before closing the first
                     one. These tags follow the LIFO principle, which stands for Last In, First Out. This means the tag
                     that is opened last must be closed first.

                                                                                                Learn HTML5 and CSS3   9

| 6 7 8 9 10 11 12 13 14 15 16 |