HTML Tags
What are HTML Tags?
The HTML tags are the basic building blocks of the document. The whole Web Page is divided into blocks and these blocks are sequentially placed to form a structured document page, To create a Website HTML tags are mandatory to use for the basic structure.
Tags are the basic elements of the HTML which contain the content in between them. The Html tags are of two types: paired and unpaired.
The paired tags are the starting and closing tags of an Html element. Elements like Html, head, body, div, style, script, button, table, etc.
<div> starting tag .... </div> closing tag
Unlike paired Html tags, the unpaired tags only have a starting tag. Elements like br, hr, input, doctype, image, etc. are the unpaired tags.
starting tag <input type="text" name="mmi" > <br/> or <br> <hr>
Here is the list of HTML tags.
List of HTML Tags
Click on the table to scroll left and right.
Tags | Description | Example |
---|---|---|
<a> | Anchor TagAnchor tag is used to link any external or internal source file with the current document. Here the a is the tag element, href is the attribute, next_page.html is the link/external file source or the destination file, and GO TO NEXT PAGE is the Text/content which will be appeared on the document. Also, it is a paired tag because it has a starting and a closing tag. Attributes href = url, target = _blank, target = _parent, target = _self, target = _top, name = name, id, class. | <a href="next_page.html" > |
<address> | Addreass TagThe Address tag is a paired tag and it is used for describing the address information in the contact us page, footer section, about us area/page, or where the address is required. The tag also supports some attributes like id, class, and title. Attributes id, class, title | <address> |
<abbr> | Abbr TagThe Abbr tag is a paired tag and it is used for the abbreviation. The abbr title display the title text like a tooltip. Attributes title = title of abbreviation |
|
<area> | Area TagThe Area is a paired tag and it is used for defining an area inside a image-map. It is used with map tag as defining an area/hyper link area on the image which is the related to map. Attributes shape = rect, shape = circle, shape = poly, coords = coordinate_points, href=hyperlink/url, alt=alternate text. |
|
<article> | Article TagThe article tag is a paired tag and it is used for writing an article with a heading as subject and text as paragraph. It is also use as a block for any content mostly article type feeds like blog post, newspaper, etc. Arttributes id, class, title. |
|
<aside> | Aside TagThe aside tag is a paired tag and it is used for making the content adjustable with other content. It is also a block type tag element which define its content placed relatively with other or with surrounding content. Attributes title, class, id. |
|
<audio> | Audio TagThe audio tag is a paired tag and it is media type tag in html. The audio tag is used to embed/use the sound file in the web page. It has an attribute controls and inner/nested source tag which include the source sound file. The controls attribute provide the play and pause button, download button, timer, and a seekbar. It support mp3, wav, ogg. Attributes Controls = basic audio controls, autoplay = autoplay, preload = metadata, preload = none, preload = auto, loop = loop - to start over, muted = muted, src = url/source file path. |
|
<b> | Bold TagThe bold tag is a paired tag and it is used to make bold to any word, letter, sentence, paragraph, etc. Arttributes id, class, title. |
|
<base> | Base TagThe base tag is a unpaired tag and it is used as alternate base url for all the relative url and links used in the document. Base url is used as a common url placed inside head tag and all the other links will used only main directory path. Attributes href = url, target = _blank, target = _parent, target = _self, target = _top. |
|
<bdo> | Bdo TagThe bdo tag is a paired tag and it is used to change the direction or override the direction of the text. The bdo is stands for Bi-Directional Override. bdo is more useful for right-to-left writing scripts/languages. Attributes dir(direction) = rlt(right to left), dir(direction) = ltr(left to right), id, class, title. |
|
<blockquote> | Blockquote TagThe blockquote tag is a paired tag and it is used for quotation. The blockquote can be import from other external source. Attributes cite = url (quote source), id, class, title. |
|
<br> | Br TagThe br tag is a unpaired tag and it is used for break line. The break line tag breaks a single line from current position and provide a line space. Attributes id, class, title. |
|
<button> | Button TagThe button tag is a paired tag and it is used for creating a visual button in the document. The button tag is used for submitting a form of data and also used for making clickable objects or content like image-button, text, link, etc. Attributes name = text, (name of the button), type = button,(default behavior) type = reset,(reset the form data/values) type = submit,(submit form data to server) autofocus = autofocus, ( focus button on load ) autofocus = false, disabled = disabled, ( disabled button ) id, class, title. |
|
<canvas> | Canvas TagThe canvas tag is a paired tag and it is used for drawing or embedding the graphics and graphics elements in the web document. This tag is used with a script tag where the main code for graphical drawing is placed. Basically JavaScript is used for scripting the graphics and it will display inside canvas tag. Any Text inside the canvas will not display as the output in the browser. You can draw circles, squares, rectangle, path, images also can be added and you can draw simple and animated text with methods. Attributes id, class, width, height, title. Canvas Drawing Script
|
|
<caption> | Caption TagThe caption tag is a paired tag and it is used to describe a caption for a table. Any text or any information about the or related to it can be placed inside caption tags which will appear above the table. Attributes id, class, title. |
|
<cite> | Cite TagThe cite tag is a paired tag and it is used to describe a text as a specific text. It can be a name of any item, product, brand, place, etc. Attributes id, class, title. |
|
<code> | Code TagThe cite tag is a paired tag and it is used to display the programming codes as an example in the web document. It can be used with <pre> tag for more clear code sample writing. Attributes id, class, title. |
|
<col> | Col TagThe col tag is a unpaired tag and it is used as a supportive tag of <colgroup>. The col tag is used for specifying column's property of the column group. In side the table tag group of columns and rows represent the data and sometimes is easy to group and highlight some columns and rows where col tag helps in highlighting the col - groups. Attributes span = it define number of column, id, class, title. |
|
<colgroup> | ColGroup TagThe colgrouptag is a paired tag and it is used for grouping up the columns. The colgroup tag is used for specifying column groups in a table. It is supported by <col> tag to highlight the specific column group. Attributes span = it define number of column, id, class, title. |
|
<data> | Data TagThe data tag is a paired tag and it is used for make a link with the data placed between these tags and it also converts that data into machine readable format. It converts the data for data processors in machine readable format and for rendering in browser it converts that code in human readable format. Attributes value = machine readable format, id, class, title. |
|
<datalist> | DataList TagThe datalist tag is a paired tag and it is used for making a pre-define list of input data in input tag. Basically it creats an drop down of that data which is used as a list form and will be autofilled/autocomplete the input. Attributes id = is used for the name match with input list name, class, title. |
|
<dd> | Dd TagThe dd tag is a paired tag and it is used with the description list tag. <dd> tag is used for putting the description or the main data of the description list. Attributes id, class, title. |
|
<del> | Del TagThe del tag is a paired tag and it is used for representing a deleted text. Mostly like ecommerce websites or other websites where the price of an item has been reduced or changed from a certain amount to a particular amount and display as a deleted text. Attributes id, class, title. |
|
<details> | Details TagThe details tag is a paired tag and it is used for specifying more details about any thing and user can view and hide that extra details. It provides additional information with a open and close button. This tag is used with summary tag and it is by default hide the content, which is visible when user click on the summary data. Attributes open = open, id, class, title. |
|
<dfn> | Dfn TagThe dfn tag is a paired tag and it is used for specifying definition terms used in the document. Example: dfn is used in a definition of HTML, here html is the main term and next sentence after this will treat as its definition or explanation. Attributes id, class, title. |
|
<dialog> | Dialog TagThe dialog tag is a paired tag and it is used to define a dialog box or a window like a modal box. Attributes open = open, id, class, title. |
|
<div> | Div TagThe div tag is a paired tag. It is a common and most used tag in the html documents. It is used for making divisions and sections or blocks in a html document. It is a used as a container which contain the content and provide a separation among other html elements. Attributes id, class, title. |
|
<dl> | Dl TagThe dl tag is a paired tag. It is used for making a description list. It is the main tag for defining the description list. Attributes id, class, title. |
|
<dt> | Dt TagThe dt tag is a paired tag. It is used for defining a name / term for the content. Attributes id, class, title. |
|
<em> | Em TagThe em tag is a paired tag. It is used for emphasized text. It makes the text italic in style. Attributes id, class, title. |
|
<embed> | Embed TagThe embed tag is a unpaired tag. It is used for embed the external resource file, media. It will make a box type container. Attributes src=file source, width = for container width, height = for container height, id, class, title. |
|
<fieldset> | Fieldset TagThe fieldset tag is a paired tag. It is used make a container like box around the form elements. It is used with another html tag "legend", Attributes disable = disable the related form elements, form_id = to specify the fieldset of a form, name = name of the fieldset, id, class, title. |
|
<figcaption> | The figcaption tag is a paired tag and it is used for caption on any figure or image. It is used with another html tag "figure", Attributes id, class, title. |
|
<figure> | Figure TagThe figure tag is a paired tag and it is used for making a self-contained data/figure/content in the web document. It is used with another html tag "figcaption" for optional caption. Attributes id, class, title. |
|
<footer> | The footer tag is a paired tag and it is used for making a footer section at the bottom of the web document. The whole web document or a web page is made up of sections and blocks of elements. For simple and basic web pages we use some common html tag for making sections like header, body, article, sidebar, navigation bar, footer etc. Attributes id, class, title. |
|
<form> | FormTagThe form tag is a paired tag. It is used to create a html web form. The form element is a common element for collecting user data. The form element is used with scripts to send data to the server and store in database. One can collect, store and retrieve data. check out the form tag in more details.. Attributes id, class, title. |
|
< H1> to < H6> | Heading Tags |
|
< Header> | Header TagsThe header tag is a paired tag. It is used for making a header section, content heading or navigation bar. It defines a section in top of any block element like defining any heading for any text paragraph or top section for nav bar. Attributes id, class, title. |
|
< Hr> | Hr TagsThe hr tag is a unpaired tag. It is used for making a horizontal line or a horizontal bar which separates or divide content. Attributes id, class, title. |
|
< i> | i TagsThe i tag is a paired tag. It is used for making any text italic in style like letter/word/sentence/paragraph in italic style. Attributes id, class, title. |
|
< iframe> | iframe TagsThe iframe tag is a paired tag. It is used for making a inline frame on the web page. it is used to add any source/document/file which will be displayed inside that iframe. Attributes width = width of the iframe, height = height of the iframe, allow = it specify the feature policy for the iframe, name = name of the iframe, src = source url, allowfullscreen = true/false for requestFullscreen() function/method for iframe, allowpaymentrequest = true/false which allow iframe to invoke the Payment Request API, srcdoc = (HTML_code) - write html code which show html content in iframe, referrerpolicy = (no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url) - allow referrer information that will be sent when processing the iframe attributes, sandbox = (allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation), it enable more restriction for iframe content, id, class, title. |
|
< img> | img TagsThe img tag is a unpaired tag. It is used to insert an image in the web page. Attributes src = url - image url, width = width of image, height = height of image, alt = alternate text for image, id, class, title. |
|
< input> | Input TagsThe input tag is a unpaired tag. It is used for user data input or through which a user can enter details in a form. It is used with different attributes in a form. check more about input tag attribute Attributes id, class, title. |
|
< ins> | Ins TagsThe ins tag is a paired tag. It is used to display an inserted text. Any text which is define as an inserted text/sentence in a web document. Attributes cite = URL, url for inserted text, datetime = (YYYY-MM-DDThh:mm:ssTZD) specify the date and time for the inserted text, id, class, title. |
|
< kbd> | Kbd TagsThe kbd tag is a paired tag. It is used to display any text as a keyboard input text like commands and short cuts key combinations. Attributes id, class, title. |
|
< label> | Label TagsThe label tag is a paired tag. It is used to display a label text in a web form like "Enter Your Name". check more about label tag in a web form Attributes id, class, title. |
|
< legend> | Legend TagsThe legend tag is a paired tag. It is used to set caption for a fieldset element in a web form like "Enter Your Name". check more about legend tag in a web form Attributes id, class, title. |
|
< li> | Li TagsThe li tag is a paired tag. It is used to make a list element inside a list type. It is used with ol, ul list type.check more about list tag and list type Attributes id, class, title. |
|
< link> | Link TagsThe link tag is a unpaired tag. It is used to link the external source files with the current document like style sheets, script files, etc.check more about file linking in html document. Attributes crossorigin = (use-credentials, anonymous) it is used to handle cross-origin requests, href = URL, path/url of the source file, rel = (alternate, dns-prefetch, author, icon, next, help, pingback, preconnect, license, prefetch, preload, prerender, prev, search, stylesheet) define a relationship between the link and current document file, size = (any, height x width) for rel = "icon" link, type = (media_type) define the media type of the link document, media = (media_query) specify the device for link document, id, class, title. |
|
< main> | Main TagsThe main tag is a paired tag. It is used to make any part of the document as a non-repeated content or a unique content like the things which is set to be non repeated example navigation bar, sidebar, any block content, copyright section, etc. Attributes id, class, title. |
|
< map> | Map TagsThe map tag is a paired tag. It is used to make a clickable image. This tag will represent an image as a map with a clickable area on that image. This tag need "img" and "area" tags. Attributes name = mapname of the map which have the same value as img "usemape" attribute, id, class, title. |
|
< mark> | Mark TagsThe mark tag is a paired tag. It is used to mark any sentence or word, like to highlight any word. Attributes id, class, title. |
|
< meter> | Meter TagsThe meter tag is a paired tag. It is used to make a graphical range meter with fractional values. It is like a unit measurement, range of any unit, etc. Attributes value = number (range value), form = form_id (main form in which the meter tag is used), high = number (for high range value), low = number (for high range value), max = number (max range value ), min = number (min range value), optimum = number (optimum range value), id, class, title. |
|
< nav> | The nav tag is a paired tag. It is used to make navigation bar. It contain all navigation links of the nav bar. Attributes id, class, title. |
|
< noscript> | Noscript TagsThe noscript tag is a paired tag. It is used to notify the user if the browser not support java script, then this noscript tag will display on the browser. Attributes id, class, title. |
|
< object> | Object TagsThe object tag is a paired tag. It is used to contain some external resources like file, media, plug in application and it also like a container object Attributes data = URL, form_id = form id, height = height of the object, width = width of the object, name = name of the object, type = media type of data in data attribute, typemustmatch = true or false, usemap = #mapname - map used with the object, id, class, title. |
|
< ol> | Ol TagsThe ol tag is a paired tag. It is used make a ordered list. The ordered list is a list with the number or alphabet in list order. it is used with the other Html element list tag"li". Attributes reversed = reversed for list order, start = starting number of the list, type = (I,A,a,i,1)specify the list marker, id, class, title. |
|
< optgroup> | Optgroup TagsThe optgroup tag is a paired tag. it is used to group the select tag elements. Attributes disabled = disabled the option-group, label = label for an option-group, id, class, title. |
|
< option> | Option TagsThe option tag is a paired tag. it is used as the option in the select tag. Like list of options. Attributes disabled = disabled the option-group, label = label for an option-group, selected = selected used for the pre-selected options, value = option value/data, id, class, title. |
|
< output> | Output TagsThe output tag is a paired tag. It is used to result an output of any calculation of a script. Attributes for = element_id used in the calculation, form = form_id of the output form, name = name for the output element, id, class, title. |
|
< p> | P TagsThe p tag is a paired tag. It is used for paragraph writing in the web page. Attributes id, class, title. |
|
< param> | Param TagsThe param tag is a unpaired tag. It is used for setting the parameters for and object. Attributes name = name of the parameter, value= value of the parameter, id, class, title. |
|
< picture> | Picture TagsThe picture tag is a paired tag. It is used for more rich and flexible content of images. It helps in designing and responsiveness of the image as it scale up with change in width and height and down with change in width and height. It is use with source and img tags. Attributes source = image and media, img = image, id, class, title. |
|
< pre> | Pre TagsThe pre tag is a paired tag. It is used for preformatted text with fix font size and space. Attributes id, class, title. |
|
< progress> | Progress TagsThe progress tag is a paired tag. It is used for representing the progress bar or any task in which is in progress. Attributes value = value/number - how much task is completed, max = number - how much task work required in total, id, class, title. |
|
< q> | q TagsThe q tag is a paired tag. It is used for short quotation. Attributes id, class, title. |
|
< rp> | rp TagsThe rp tag is a paired tag. It is used with other ruby supporting tags rt and ruby. It is used for providing parentheses around a ruby annotation. Attributes id, class, title. |
|
< rt> | rt TagsThe rt tag is a paired tag. It is used with other ruby supporting tags rp and ruby. It is used defines an explanation or pronunciation of characters (for East Asian typography) in a ruby annotation. Attributes id, class, title. |
|
< ruby> | ruby TagsThe ruby tag is a paired tag. It is used with other ruby supporting tags rt and rp. It is used for East Asian typography and for different writing characters, and pronunciation. The ruby is used with Japanese writing characters, Chinese writing characters and Korean style writing character in a ruby annotation though which these characters can be displayed by the web browser. Attributes id, class, title. |
|
< s> | s TagsThe s tag is a paired tag. It is used for the incorrect text in a sentence Like - Any word or sentence which is not accurate or changed. Attributes id, class, title. |
|
< samp> | samp TagsThe samp tag is a paired tag. It is used to display the monospace font. It is basically used for the output like text as a result of a computer program. Attributes id, class, title. |
|