Some HTML Tags And Their Definition (With Example)

  1. HTML Comment Tag (<!--.....--> Defines a comment)

    The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers.
    You can use comments to explain your code, which can help you when you edit the source code at a later date. This is especially useful if you have a lot of code.
    Example: <!--ICICT This is a tutorial teaching HTML tags definition--> Note HTML comments don't show on browsers.

    Some HTML Tags And Their Definition

  2. HTML Document Type Tag (<!DOCTYPE> Defines the document type)

    The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag. The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

  1. HTML link tag (<a> Defines a hyperlink )

    The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the <href> attribute, which indicates the link's destination.

  2. HTML Body Tag (<body> Defines the document's body)

    The <body> tag defines the document's body.
    The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.

  3. HTML Head Tag (<head> Defines information about the document)

    The <head> element is a container for all the head elements.
    The <head> element can include a title for the document, scripts, styles, meta information, and more.
    The following elements can go inside the <head> element: <title>, <style> , <base>, <link>, <meta>, <script>, <noscript> 
  4.  
     
  1. HTML Paragraph Tag (<p> Defines a paragraph>
    <p>This is some text in a paragraph.</p> 
     
  2. HTML Image Tag (<img> Defines an image)
    The <img> tag defines an image in an HTML page. The <img> tag has two required attributes: <src> and <alt>
    Note: Images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.
    <src>

  3. HTML Table Tag (<table> Defines a table)
    An HTML table consists of the <table> element and one or more <tr>, <th>, and <td> elements.
    The <tr> element defines a table row, the <th> element defines a table header, and the <td> element defines a table cell.
    A more complex HTML table may also include <caption>, <col>, <colgroup>, <thead>, <tfoot>, and <tbody> elements.

  4. HTML Quote Tag (<blockquote> Defines section that is quoted from another source)

    Example is:
    <blockquote> ICICT is here to help you in programming </blockquote> this will appear as: ICICT is here to help you in programming

  5. HTM DIV Tag (<div> Defines a section in a document)

    The <div> tag defines a division or a section in an HTML document.
    The <div> tag is used to group block-elements to format them with CSS.

  6. HTML Style Tag (<style> Defines style information for a document>)


    Inside the <style> element you specify how HTML elements should render in a browser. Each HTML document can contain multiple <style> tags. And it can only be used in the <head> Section Of Your HTML Document</head> Example is
    <style>
    h1 {color:red;}
    p {color:blue;}
    </style>

    this above code will make all <h1> header 1 document's color change to red at the same time all <p> paragraph text be blue
  1. HTML Line Break and Horizontal Line Tag (<br> Defines a single line break, <hr> )


    The <br> tag is an empty tag which means that it has no end tag.
    The <hr> element is used to separate content in an HTML page with a straight line. 
     
  2. HTML Heading Tags (<h1>, <h2>, <h3> - <h6> Defines HTML headings)


    <h1>This is heading 1 ICICT</h1>
    <h2>This is heading 2 ICICT</h2>
    <h3>This is heading 3 ICICT</h3>
    <h4>This is heading 4 ICICT</h4>
    <h5>This is heading 5 ICICT</h5>
    <h6>This is heading 6 ICICT</h6>
    The h1 is the biggest heading while h6 is the smallest

  3. HTML Iframe Tag (<iframe>)


    An inline frame is used to embed another document or web page within the current HTML document.
    <iframe src="http://www.icict.blogspot.com"></iframe> 
     
  4. HTML Form Tag (<form> Defines an HTML form for user input)


    Example is:
    <form action="demo_form.asp" method="get">
      First name: <input type="text" name="fname"><br>
      Last name: <input type="text" name="lname"><br>
      <input type="submit" value="Submit">
    </form> 
     
  5. HTML List Tags (<ul>, <ol>)


    Their are two types of list in HTML which are Ordered and Un-ordered lists
  • <ol> this will print lists with either alphabets, roman figures or default numerics and each list is defined by <li> tag eg
    <ol>
    <li> icict 1</li>
    <li> icict 2 </li>
    <ol>
  • <ul> is not in order its either printed as bullet or square lists, the lists are defined by <li> tag just like ordered lists.

Comments :

  1. oh nice i told my friends about this blog of yours i think even without going to school someone can learn coding from you with the help of this blog....

    ReplyDelete

Post a Comment