Loading...
Html

Types of Tags in HTML

  1. <HTML> Tag: This tag is to create the web page . The <html> tag should always be in the first line and </html> in the last line of code in the HTML file.
    Example:
    <html>
          <head>
               <title>
                      Webnoid Schools First Page 
               </title>
          </head>
          <body>
               <h1>
                     Welcome to Webnoid Schools
                </h1>
          </body>
    </html>
  2. <HEAD> Tag:  This tag contain the head of the HTML document, which holds information about the document ,such as its title. There are certain tags like <link>, <title>, <meta> which can only appear in the page’s head.
  3. <TITLE> Tag: It tag contains the title of the HTML document, which appears in the web browser’s title bar and is used by search engines to refer the document.
  4. <BODY> Tag: This tag contains the body of the HTML document, which includes creating a web page’s the contents that will actually appear in the web browser. It may body include text, images, links forms, etc.
    <BODY> Tag attributes:  HTML tags tells web browser how to format and organize our web pages. An attribute is a keyword that we use in an opening tag to give more information to the web browser.
    The attributes of “Body” tag are:
    a) BACKGROUND: It is used to have an image file as a background of a browser.
    b) BGCOLOUR: It specified the color of the browser’s background. It may be one of the predefined color value. 
    c) BOTTOMMARGIN:  They specifies the bottom, left, top, right margin,the empty space at left, top, bottom and right of the document, in pixels.
    d) TEXT: Color of the text in the document.
    e) SCROLL: It specifies whether a vertical scroll bar appears to the right of the document, can be YES or NO.
    Example:
    <html>
          <head>
                 <title>
                       Webnoid Schools Second Page
                 </title>
          </head>
          <body leftmargin = 200 BGCOLOR = “Blue” TEXT = “black>
              Welcome to Webnoid Schools 
          </body>      
    </html>
  5. Headers Tag: These tags  are used to create the “headlines” in our pages by allowing font changes and paragraph breaks. There are six levels of headings h1, h2, h3, h4, h5, h6.
    h1 is the biggest heading.
    h2 is the smallest heading.
    By default heading tags align the text to the left of the web page. We can change the alignment by using alignment attributes.
    Example:
    align= left/ center/ right
    <html>
          <head>
               <title>
                    headings
               </title>
          </head>
         <body>
              <h1 align = “left”> Welcome to html </h1>
              <h2 align = “left”> Welcome to html </h2>
              <h3 align = “center”> Welcome to html </h3>
              <h4 align = “center”> Welcome to html </h4>
              <h5 align = “right”> Welcome to html </h5>
              <h6 align = “right”> Welcome to html </h6>
         </body>
    </html>
  6. Prologue/ Comment Tag: This tag is used to write comments in the HTML that we can read by looking at the HTML, but it will not be displayed in the web browser.
    Example:
    <html>
         <! — This is the head of the page — > 
          <head>
          <! — This title will appear in the title bar — >
                 <title>
                       Welcome to Webnoid Schools
                 </title>
          </head>
          <! — This is the body of the page — >
          <body>
                 Welcome to HTML
          </body
    </html>
                                                                                                  
                                                                

Leave a Reply

Your email address will not be published. Required fields are marked *