Comprehensive Guide to Commonly Used HTML Tags and Attributes

Tag Description
<html> Defines the start and end of an HTML document.
<title> Provides the title of the website.
<meta> Used for various purposes like specifying character set, viewport settings, etc.
<link> Used to add external code (e.g., CSS) to the HTML file.
<body> Contains the body of the webpage.
<input> Used for input fields.
<input type="password"> For password input.
<input type="email"> For email input.
<input type="text"> For text input.
<input type="text" placeholder="Enter your Name"> Text input with a placeholder.
<input type="text" placeholder="Enter your Name" required> Required text input with a placeholder.
<input type="file"> For file input (e.g., video, image, document).
<input type="date"> For date input.
<button type="submit"> Used to create a submit button.
<h1> Main heading for SEO purposes; use at least one <h1> tag per website.
<h2> Subheading.
<p> Paragraph tag.
<form method="post"> Used to create a form for data submission.
<div> Used to create a container for other elements.
<nav> Used to create a navigation section.
<li> Used to create a list item.
<ol> Ordered list.
<ul> Unordered list.
<td> Table data cell.
<tr> Table row.
<th> Table header cell.
<thead> Groups header content in a table.
<iframe src="src source"> Used to embed another HTML page within the current page.
<img src="source" /> Used to add an image to the webpage.
<a href="link"></a> Used to create a hyperlink.
<script src="js_file"></script> Used to link to an external JavaScript file.
<input type="number"> Input field for numbers.
<input type="checkbox" value="1"> Checkbox input for selecting multiple options.
<input type="radio" value="1"> Radio button input for selecting a single option.
<textarea> Used for multi-line text input.
<select> Drop-down list control.
<option> Defines an option in a drop-down list.
<header> Represents the header of a section or page.
<footer> Represents the footer of a section or page.
<section> Defines a section in a document.
<article> Represents a self-contained piece of content.
<aside> Defines content aside from the main content.
<main> Specifies the main content of a document.
<figure> Specifies self-contained content, like illustrations, diagrams, photos, etc.
<figcaption> Provides a caption for a <figure> element.
<mark> Highlights text.
<progress> Displays progress of a task.
<time> Represents a specific time (e.g., a date or time of day).
<video> Used to embed video content.
<source> Specifies multiple media resources for media elements like <video> and <audio>.
<svg> Used to define vector-based graphics.
<canvas> Used to draw graphics on the fly via JavaScript.
<details>
img



Next Post Previous Post
No Comment
Add Comment
comment url