What is html tag with example?

next → ← prev

HTML tags are like keywords which defines that how web browser will format and display the content. With the help of tags, a web browser can distinguish between an HTML content and a simple content. HTML tags contain three main parts: opening tag, content and closing tag. But some HTML tags are unclosed tags.

When a web browser reads an HTML document, browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.

An HTML file must have some essential tags so that web browser can differentiate between a simple text and HTML text. You can use as many tags you want as per your code requirement.

  • All HTML tags must enclosed within < > these brackets.
  • Every tag in HTML perform different tasks.
  • If you have used an open tag , then you must use a close tag [except some tags]

Syntax

content

HTML Tag Examples

Note: HTML Tags are always written in lowercase letters. The basic HTML tags are given below:

Paragraph Tag

Heading Tag

Bold Tag

Italic Tag

Underline Tag

Test it Now

Unclosed HTML Tags

Some HTML tags are not closed, for example br and hr.


Tag
: br stands for break line, it breaks the line of the code.

Tag: hr stands for Horizontal Rule. This tag is used to put a line across the webpage.

HTML Meta Tags

DOCTYPE, title, link, meta and style

HTML Text Tags

,

,

,

,

, , , , , , , , ,
, , , , , , , ,
, ,  and 

HTML Link Tags

and

HTML Image and Object Tags

represents newly added Elements in HTML5.

HTML Tags by Alphabets

ABCDEFGHIJKLMNOPQRSTUVWXYZ

Tag nameDescription
This tag is used to apply comment in an HTML document.
This tag is used to specify the version of HTML
A
It is termed as anchor tag and it creates a hyperlink or link.
It defines an abbreviation for a phrase or longer word.
It defines acronym for a word. [Not supported in HTML5]
It defines the author's contact information of the HTML article
It defines an embedded Java applet. [Not supported in HTML5]
It defines the area of an image map.
It defines the self-contained content.
It defines content aside from main content. Mainly represented as sidebar.
It is used to embed sound content in HTML document.
B
It is used to make a text bold.
This tag defines the base URL for all relative URL within the document.
This tag is used to set default font, size and color for all elements of document. [Not supported in HTML5]
This tag is used to provide isolation for that part of text which may be formatted in different directions from its surrounding text.
It is used to override the current text direction.
This tag is used to make font size one level larger than its surrounding content. [Not supported in HTML5]
It is used to define a content which is taken from another source.
It is used to define the body section of an HTML document.

It is used to apply single line break.
It is used to represent a clickable button
C
It is used to provide a graphics space within a web document.
It is used to define a caption for a table.
It is used to align the content in center. [Not supported in HTML5]
It is used to define the title of the work, book, website, etc.
It is used to display a part of programming code in an HTML document.
It defines a column within a table which represent common properties of columns and used with the element.
It is used to define group of columns in a table.
D
It is used to link the content with the machine-readable translation.
It is used to provide a predefined list for input option.
It is used to provide definition/description of a term in description list.
It defines a text which has been deleted from the document.
It defines additional details which user can either view or hide.
It is used to indicate a term which is defined within a sentence/phrase.
It defines a dialog box or other interactive components.
It is used as container for directory list of files. [Not supported in HTML5]
It defines a division or section within HTML document.
It is sued to define a description list.
It is used to define a term in description list.
E
It is used to emphasis the content applied within this element.
It is used as embedded container for external file/application/media, etc.
F
It is used to group related elements/labels within a web form.
It is used to add a caption or explanation for the element.
It is used to define the self-contained content, and s mostly refer as single unit.
It defines the font, size, color, and face for the content. [Not supported in HTML5]
It defines the footer section of a webpage.
It is used to define an HTML form.
It defines a particular area of webpage which can contain another HTML file. [Not supported in HTML5]
It defines group of Frames. [Not supported in HTML5]
H

to

It defines headings for an HTML document from level 1 to level 6.
It defines the head section of an HTML document.
It defines the header of a section or webpage.
It is used to apply thematic break between paragraph-level elements.
It represents root of an HTML document.
I
It is used to represent a text in some different voice.
It defines an inline frame which can embed other content.
It represents the main content of an HTML document.
It defines an image map with active areas.
It represents a highlighted text.
It is used to insert the scrolling text or an image either horizontally or vertically. [Not supported in HTML5]
It is used for creating a menu list of commands.
It defines metadata of an HTML document.
It defines scalar measurement with known range or fractional value.
N
It represents section of page to represent navigation links.
It provides alternate content to represent in browser which does not support the elements. [Not supported in HTML5]
It provides an alternative content if a script type is not supported in browser.
O
It is used to embed an object in HTML file.
It defines an ordered list of items.
It is used to group the options of a drop-down list.
It is used to define options or items in a drop-down list.
It is used as container element which can show result of a calculation.
P

It represents a paragraph in an HTML document.
It defines parameter for an element
It defines more than one source element and one image element.
It defines preformatted text in an HTML document.
It defines the progress of a task within HTML document.
Q
It defines short inline quotation.
R
It defines an alternative content if browser does not supports ruby annotations.
It defines explanations and pronunciations in ruby annotations.
It is used to represent ruby annotations.
S
It render text which is no longer correct or relevant.
It is used to represent sample output of a computer program.
It is used to declare the JavaScript within HTML document.
It defines a generic section for a document.
It represents a control which provides a menu of options.
It is used to make text font one size smaller than document?s base font size.
>
It defines multiple media recourses for different media element such as , , and element.
It is used for styling and grouping inline.
It is used to render strike through the text. [Not supported in HTML5]
It is used to define important text.
It is used to contain style information for an HTML document.
It defines a text which displays as a subscript text.
It defines summary which can be used with tag.
It defines a text which represent as superscript text.
It is used as container of SVG [Scalable Vector Graphics].
T
and . and tags.
It is used to present data in tabular form or to create a table within HTML document.
It represents the body content of an HTML table and used along with
It is used to define cells of an HTML table which contains table data
It is used to contain the client side content which will not display at time of page load and may render later using JavaScript.
It is used to define multiple line input, such as comment, feedback, and review, etc.
It defines the footer content of an HTML table.
It defines the head cell of an HTML table.
It defines the header of an HTML table. It is used along with
It is used to define data/time within an HTML document.
It defines the title or name of an HTML document.
It defines the row cells in an HTML table
It is used to define text tracks for and elements.
It is used to define teletype text. [Not supported in HTML5]
U
It is used to render enclosed text with an underline.
It defines unordered list of items.
V
It defines variable name used in mathematical or programming context.
It is used to embed a video content with an HTML document
W
It defines a position within text where break line is possible.

Next TopicHTML Attributes

← prev next →

What are the 10 basic HTML tags with examples?

10 HTML Tags.

What are tags give any 5 examples?

Tags are always enclosed in angle brackets: < >. Tags are comprised of elements and attributes. ... Content [Container] Tags..

What is HTML and explain 20 different tags with example?

Basic HTML.

Chủ Đề