HTML Elements

HTML Elements

What is HTML Elements.?

HTML Elements are referred as a tag, both the entities are Similar. There are many HTML elements.

  1. <a> tag

     <!DOCTYPE html>
     <html lang="en">
     <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>a tag</title>
     </head>
     <body>
        Visit Google : <a href="https://google.com">Google</a>
     </body>
     </html>
    

    <a> tag is also known as a anchor tag. It's used to create hyperlink to the webpages, files, documents, email address, locations or anything else URL can address. It has "href" attribute in which URL exists.

  2. <abbr> tag

     <!DOCTYPE html>
     <html lang="en">
     <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>abbr tag</title>
     </head>
     <body>
         <p>I am <abbr>paragraph</abbr> tag</p>
         <h3>I am a <abbr>Blogger</abbr></h3>
     </body>
     </html>
    

    <abbr> HTML tag is represents an abbreviation or acronym. When including an abbreviation or acronym, provide a full expansion of the term in plain text on first use, along with the <abbr> to mark up the abbreviation. This informs the user what the abbreviation or acronym means.

  3. <br> tag

     <!DOCTYPE html>
     <html lang="en">
     <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>br tag</title>  
     </head>
     <body>
         <p>Lorem ipsum dolor, sit amet consectetur <br>adipisicing elit. Totam autem quibusdam sab  <br>epe? Ducimus consectetur laboriosam doloremque quia? Voluptatem, enim vel?</p>
     </body>
     </html>
    

    <br> tag is used break the line of text. It,s useful when writing a poem or adress where the divisions of line are significant.

  4. <img> tag

     <!DOCTYPE html>
     <html lang="en">
     <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>Image</title>
     </head>
     <body>
         <img src="https://tse4.mm.bing.net/th?id=OIP.9nE4ZB9uC6jIO-_ll_jbtwHaDM&pid=Api&P=0&h=180" alt="Image" height="200px" width="100px">
     </body>
     </html>
    

    <img> tag is used to insert the image on website. It embeds the image into the document. It has "src" attribute which includes the path or we can directly say, image address, and "height" & "width" attributes are used for the size of the image which fits on the webpage.

  5. // Comments

     <!DOCTYPE html>
     <html lang="en">
     <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>Comments</title>
     </head>
     <body>
         <!-- ctrl + / or cmd + / -->
         <h1>This is Heading</h1> <!-- This Highest Heading Level in HTML -->
         <p>I'm From Maharshtra, India</p> <!-- This is Location -->
     </body>
     </html>
    

    Comments in the HTML are created by <!-- -->, whatever we write inside this is ignored by the Browser. Comments are used to make users easy to understand the things as well as who reads your code understand easily.