HTML Tags
Published by
sanya sanya
Main root
<html> The <html> HTML element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.
Document Metadata
Metadata contains information about the page. This includes information about styles, scripts, and data to help software (search engines, browsers, etc.) use and render the page. Metadata for styles and scripts may be defined on the page or linked to another file that has the information.
<head> The <head> HTML element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
<link> The <link> HTML element specifies relationships between the current document and an external resource. This element is most commonly used to link to CSS but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
<meta> The <meta> HTML element represents Metadata that cannot be represented by other HTML meta-related elements, like base, link, script, style, or title.
<style> The <style> HTML element contains style information for a document or part of a document. It contains CSS, which is applied to the contents of the document containing the <style> element.
<title> The <title> HTML element defines the document's title that is shown in a Browser's title bar or a page's tab. It only contains text; tags within the element are ignored.
Main Content - Body
<body> The <body> HTML element represents the content of an HTML document. There can be only one <body> element in a document.
Content Sectioning
<article> The <article> HTML element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable. Examples include a forum post, a magazine or newspaper article, a blog entry, a product card, etc.
<aside> The <aside> HTML element represents a portion of a document whose content is only indirectly related to the document's main content. Asides are frequently presented as sidebars or call-out boxes.
<footer> The <footer> HTML element represents a footer for its nearest ancestor sectioning content or sectioning root element. A <footer> typically contains information about the author of the section, copyright data, or links to related documents.
<header> The <header> HTML element represents introductory content, typically a group of introductory or navigational aids. It may contain some heading elements but also a logo, a search form, an author name, and other elements.
<main> The <main> HTML element represents the dominant content of the body of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.
<nav> The <nav> HTML element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes.
<section> The <section> HTML element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. Sections should always have a heading, with very few exceptions.
Text Content
<blockquote> The <blockquote> HTML element indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it).
<div> The <div> HTML element is the generic container for flow content. It has no effect on the content or layout until styled in some way using CSS (e.g. styling is directly applied to it, or some kind of layout model like Flexbox is applied to its parent element).
<figcaption> The <figcaption> HTML element represents a caption or legend describing the rest of the contents of its parent figure element.
<figure> The <figure> HTML element represents self-contained content, potentially with an optional caption, which is specified using the figcaption element. The figure, its caption, and its contents are referenced as a single unit.
<hr> The <hr> HTML element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.
<li>The <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list (ol), an unordered list (ul), or a menu (menu). In menus and unordered lists, list items are usually displayed using bullet points.
<ol> The <ol> HTML element represents an ordered list of items — typically rendered as a numbered list.
<p> The <p> HTML element represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields.
<pre> The <pre> HTML element represents preformatted text which is to be presented exactly as written in the HTML file. Whitespace inside this element is displayed as written.
<ul> The <ul> HTML element represents an unordered list of items, typically rendered as a bulleted list.
Inline Text Semantics
Use the HTML inline text semantic to define the meaning, structure, or style of a word, line, or any arbitrary piece of text.
<a> The <a> HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.
<br> The <br> HTML element produces a line break in the text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
<cite> The <cite> HTML element is used to mark up the title of a cited creative work. The reference may be in an abbreviated form according to context-appropriate conventions related to citation metadata.
<code> The<code> HTML element displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code. By default, the content text is displayed using the user agent's default monospace font.
<em> The> em HTML element marks text that has stress emphasis. The <em> element can be nested, with each level of nesting indicating a greater degree of emphasis.
<span> The <span> can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. is very much like a div element, but div is a block-level element whereas a is an inline element.
<strong> The <strong> HTML element indicates that its contents have strong importance, seriousness, or urgency. Browsers typically render the contents in bold type.
<sub> The <sub> HTML element specifies inline text which should be displayed as the subscript for solely typographical reasons. Subscripts are typically rendered with a lowered baseline using smaller text.
<sup> The <sup> HTML element specifies inline text which is to be displayed as a superscript for solely typographical reasons. Superscripts are usually rendered with a raised baseline using smaller text.
<u> The <u> HTML element represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation. This is rendered by default as a simple solid underline, but may be altered using CSS.
Image and Multimedia
<area> The <area> HTML element defines an area inside an image map that has predefined clickable areas. An image map allows geometric areas on an image to be associated with Hyperlinks.
<audio> The <audio> HTML element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the source element: the browser will choose the most suitable one.
<img> The <img> HTML element embeds an image into the document.
<video> The <video> HTML element embeds a media player which supports video playback into the document. You can use <video> for audio content as well, but the audio element may provide a more appropriate user experience.
Embedded Content
In addition to regular multimedia content, HTML can include a variety of other content, even if it's not always easy to interact with.
<embed> The <embed> HTML element embeds external content at the specified point in the document. This content is provided by an external application or another source of interactive content such as a browser plug-in.
<iframe> The <iframe> HTML element represents a nested browsing context, embedding another HTML page into the current one.
Scripting
In order to create dynamic content and Web applications, HTML supports the use of scripting languages, most prominently JavaScript. Certain elements support this capability.
<canvas> Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.
<script> The <script> HTML element is used to embed executable code or data; this is typically used to embed or refer to JavaScript code. The <script> element can also be used with other languages, such as WebGL's GLSL shader programming language and JSON.
Table Content
<caption> The <caption> HTML element specifies the caption (or title) of a table.
<col> The <col> HTML element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a colgroup element.
<colgroup> The <colgroup> HTML element defines a group of columns within a table.
<table> The <table> HTML element represents tabular data — that is, the information presented in a two-dimensional table comprised of rows and columns of cells containing data.
<tbody> The <tbody> HTML element encapsulates a set of table rows (tr elements), indicating that they comprise the body of the table (table).
<td> The <td> HTML element defines a cell of a table that contains data. It participates in the table model.
<tfoot> The <tfoot> HTML element defines a set of rows summarizing the columns of the table.
<th> The <th> HTML element defines a cell as the header of a group of table cells. The exact nature of this group is defined by the scope and header attributes.
<thead> The <thead> HTML element defines a set of rows defining the head of the columns of the table.
<tr> The <tr> HTML element defines a row of cells in a table. The row's cells can then be established using a mix of td (data cell) and the (header cell) elements.
Forms
HTML provides a number of elements that can be used together to create forms that the user can fill out and submit to the website or application.
<button> The <button> HTML element is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it then performs an action, such as submitting a form or opening a dialog.
<fieldset> The <fieldset> HTML element is used to group several controls as well as labels (label) within a web form.
<form> The <form> HTML element represents a document section containing interactive controls for submitting information.
<input> The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. The <input> element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of input types and attributes.
<label> The <label> HTML element represents a caption for an item in a user interface.
<legend> The <legend> HTML element represents a caption for the content of its parent fieldset.
<option> The <option> HTML element is used to define an item contained in a select, an opt group, or a data list element. As such, <option> can represent menu items in popups and other lists of items in an HTML document.
<select> The <select> HTML element represents a control that provides a menu of options.
<textarea> The <textarea> HTML element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example, a comment on a review or feedback form.
Library
WEB DEVELOPMENT
Basic
HTML - Hyper Text Markup Language
HTML: Hyper Text Markup Language
Getting Started with HTML
Working with Tags
HTML Tags
Attributes
Block & Inline Elements , HTML Entities
HTML Links
HTML Forms
Tables In HTML
HTML SEMANTICS
CSS - Cascading Style Sheets
JavaScript
Frontend
Backend
Interview Questions
FAANG QUESTIONS
On this page
Main root
Document Metadata
Main Content - Body
Content Sectioning
Text Content
Inline Text Semantics
Image and Multimedia
Embedded Content
Scripting
Table Content
Forms

