HTML files consist of text, which is in turn subdivided into individual elements. HTML tags are used to mark up the source code of an HTML document. The type of tag used determines how the document is presented in a browser, for example.
Introductory HTML tags are always enclosed in angle brackets.
<introductory HTML tag>
Closing HTML tags contain a slash inside the brackets.
</ closing HTML tag>
HTML tags that do not require a closing part are called standalone tags. It is generally recommended to write all tags in lower case. That way there won’t be any problems with XHTML, where only lowercase characters are allowed.
Additional information about HTML tags are enclosed in quotation marks and introduced without commas.
<img src=“image URL“ align=“left“>
This image is from an online source, and is integrated into the document with a link.
These HTML tags structure text.
This tag is used to mark up a header. In an HTML document, the order of header tags should be chronologically in ascending order. A header tagged with h1 should not be after a header tagged with h2.
This defines a complete paragraph within a text.
A general block element can be marked up with this.
In this manner, a horizontal line is inserted into the HTML document. With additional information you can specify the size and thickness of the line and its position. Examples:
horizontal line left justified
<hr align=“center“ width=“150“ size=“2“ color=“#FBFBEF“>
centered dividing line in the length of 150 pixels and the thickness of two pixels in white
This is a complete block element that is inserted within these tags. These tags usually do not stand by themselves and you can specify the formatting of the entire block.
<div class style="font-family:sans-serif; font-size:11pt" align=“left“>
The size of the block is 11, the font is sans serif. The entire text is left-justified.
This tag inserts a line break. It can also get extended.
This ensures that the text flows left-justified with embedded images.
In this way, preformatted text can be copied exactly.
These tags format the font. Individual words can be displayed in bold or italic for example.
This allows you to define inline elements such as bold words, via CSS.Example:
<span style="font-weight: bold;">bolded word</span>
The text within these tags is a quote from another source.
This tag configures the font color, font, and size according to the old HTML standard.
<font face=“Arial“ size=“2“>…</font>
The text within the tag is then written in Arial font size 2.
This tag is used for bolded words.
This marks a definition.
This cites the title of a work.
Computer code can be represented graphically with this tag.
Text that is within these tags is output in italics.
<u>…</u>''' or '''<ins>…</ins>
This allows you to underscore words.
If you want to imitate the font of a typewriter, use these tags.
This outputs very large fonts.
These tags highlight a text.
These tags make the font small.
Short quotations can be marked up this way.
<strike>...</strike>''' or '''<del>...</del>
You can strike out words with these tags. In blogs, this is a stylistic tool often used to highlight the previously written text or to show that the crossed-out words are no longer valid.
<sub>...</sub>''' or '''<sup>...</sup>
These tags allow you to subscript words.
Even images can be integrated into documents with HTML tags and formatted.
This tag indicates the image source. There are other parameters that govern the image reproduction and image markup for formatting.
Describes the image content when a browser does not load the image
Puts the image in a frame
height=“...“ and width=“...“
This size information can help to ensure that images will load faster.
hspace=“...“ and vspace=“...“
Define the distance of the image to text
Arranges the image in relation to the following text
You can embed a hyperlink in an image (reference-sensitive graphics)
Shows the regions of the image, where links are inserted
Specifies the shape of the clickable area
Specifies the name of a reference-sensitive graphics.
Even hyperlinks are marked up with HTML tags.
<a href="URL">... code
These tags link text, an image or other element of the HTML code. If the document is to be opened in a new window, the tag is supplemented with target ="_ blank".
This tag links destination anchor within a document.
With this tag you specify in the source code that the link has to direct to an anchor in the same document.
A hyperlink tagged this way, points to a specific text in another HTML document or a webpage.
Hyperlink to an email address. For example,
Using HTML tags complete lists can be displayed.
These tags are used for glossaries and definition lists.
These tags enclose individual elements of a list and select individual rows within the list.
<ol type=["1"|"I"|"A"|"a"] start=...> <li>...</li><li>...</li></ol>
You can produce a sorted list respectively arranged by numbers, roman numerals, uppercase or lowercase. “start” defines the starting value of the list.
<ol type=["1"] start=3> <li>...</li><li>...</li></ol>
This is a sorted list that starts with the number three.
An unordered list is marked up this way. All sub-items get the same bullet symbol (type).
These tags insert a table into the document. There are more options for the definition of the table similar to images. Moreover, you can insert backgrounds with background="...". Frame width and cell spacing can be defined with cellpadding/cellspacing="...".
This tag applies to all contents of a table row.
These tags define a single cell of a table.
You can insert a comment in an HTML document with these tags.
You can define the document type with this.
This lets you specify an abbreviation.
This tag provides information about the creator or owner of the HTML document.
This tag defines an article.
With this tag, content can be distinguished from the content of the document independently.
This marks up audio elements.
This tag marks up the basic URL for all relative URLs within the document.
These tags define the document body.
A clickable button gets marked in the document with this tag.
This allows you to insert pre-defined options for entries.
Users can view or hide this information.
A dialog box is defined with these tags.
Other elements from an external source (such as YouTube videos) can be integrated into an HTML document.
These tags define the footer area of a webpage.
With these tags, a form is defined, in which a user can enter numbers or text.
Information about the document can be found between these tags. These elements are also called metatags.
You can define a header for a document with these tags.
The root of an HTML document can be fixed using these.
Documents can be enriched with content from iframes.
This defines the link between a document and an external source.
You can mark the main content of a website with this.
This tag marks the meta specifications of an HTML document.
Navigation links can be marked up with these tags.
Alternative content for users whose browser cannot load specific scripts can be stored here.
Embedded objects can be defined.
This marks up a client-side script.
This way, various multimedia resources can be defined.
This tag notes a date and/or time for the document.
This stores a title for the webpage.
HTML tags are important for the on-page optimization of websites because usability and the flow of reading a website can be improved with text-structuring tags. Primarily, text-structuring HTML tags serve this purpose. At the same time, a clear markup of the content ensures that bots can crawl the website better and faster.
Elements such as page titles are also relevant to ranking. For this reason, this tag should get special attention in optimizing.