5 Commonly used HTML Tags

Hyper Text Markup Language is the standard markup language for documents designed to be displayed in a web browser. You can create documents using multiple HTML tags. Let’s see some of the important HTML tags.

  • Comment Tag ( <!— … –> ) : This tag is used for putting comments inside your file. Comments are not visible on web page. It is important to write comments so the purpose of the code can be explained to other developers and your future self.
<!--- This is a welcome span --> 
<span>Welcome !<span>
  • Button Tag ( <button></button> ) : button tag defines a clickable button. Button tag supports events attributes. In between the opening and closing brackets, we can define the label/text for the button which is useful for the user.
<button>Click Me</button>
  • Div ( <div></div> ) : div tag is used for creating a block of content inside your HTML.
<div style="background-color:red;text-align:center;">
  <p>Please click here to proceed</p>
  <button>Click Me</button>
</div>
  • Span( <span></span> ) : span is used for styling purposes inside other elements. span is an inline element.
<div style="background-color: black;color:white">
  <span style="background-color:red;">Hello World</span>
</div>
  • p( <p></p> ) : p tag is used for paragraphs. By default, browser adds blank line before and after this tag
<div style="background-color: black;color:white">
  <p><span style="background-color:red;">Hello World</span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>  
</div>

I hope this post was helpful to you. If you like my post, follow me @twitter/andramazo.

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top