Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 25 - 2606_PlugGPT_C6_Flipbook
P. 25

    ATTRIBUTES

                     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
                     what you want for the respective property.
                     Syntax to specify the attribute of any tag:

                     <tag_name attribute_name = “value”>

                               HTML COMMENTS

                     Comments  are used  to  add  notes  or explanations within an HTML  document.  They help the
                     programmer  by  making it  easier  to  understand  and edit  the  document  later. You  can add
                     comments using a special tag, which looks like this: <!-- comment goes here -->.
                     For example, <!-- This is a comment in HTML -->

                               RULES FOR WRITING HTML CODES

                     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.

                       Tag name should not contain spaces.
                       There should be no space between < and > in a tag.               Tags must be nested correctly.

                               STRUCTURE OF AN HTML DOCUMENT

                     The structure of an HTML document is:

                      <!DOCTYPE HTML>
                      <HTML>
                        <HEAD>
                          <TITLE> The title of the webpage goes here. </TITLE>
                        </HEAD>

                        <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.
                        </BODY>

                      </HTML>

                                                                                                Learn HTML5 and CSS3  23

| 20 21 22 23 24 25 26 27 28 29 30 |