HTML tags and attributes within the tag are used to create the HTML documents that you see displayed via the internet. You can use HTML code to add images, create links, and modify how text is displayed. There are many tags that are available to help you design and format your page. You can see our HTML tag reference list for a full list. This article will go over several of the most commonly used HTML tags.
Header tags
Header tags are used to help divide content. They are commonly used with titles of sections. They are also numbered from <h1> to <h6>. The <h1> tag is deemed to be the most important, so it is larger than the others. They continue to be smaller in size down to the h6 tag, which is the smallest. While <h1> tags are very common, the lower end tags such as <h5> and <h6> are used only in deeply detailed documents. Below is an example of each of the header tags.
Code:
<h1>This is an H1</h1> <h2>This is an H2</h2> <h3>This is an H3</h3> <h4>This is an H4</h4> <h5>This is an H5</h5> <h6>This is an H6</h6>
Output:
This is an H1
This is an H2
This is an H3
This is an H4
This is an H5
This is an H6
Strong tag
The <strong> tag is used to make important words or text stand out. This tag makes the text appear in bold. In HTML 5, it is often used to replace the <b> tag. By HTML 5 standards, you should always use the <strong> tag when you need bold text. Below is an example of some strong text.
Code:
<strong>This is strong text.</strong>
Output:
This is strong text.
Emphasis tag
The <em> tag is used to make text stand out from the surrounding text. This text would be important enough to stand out, but not as important as the text that uses the <strong> text. Most commonly, it is used to display text in italics and is often used in place of the <i> tag. Below is a sample of some text using the <em> tag.
Code:
This is a normal sentence. <em>This one needs to stand out a bit.</em> This is another normal sentence.
Output:
This is a normal sentence. This one needs to stand out a bit. This is another normal sentence.
Line Break tag
The <br /> tag is used for making text go to the next line in a specific place. A long sentence will wrap at the edge of the page automatically, but this will very depending on the width of the viewer’s screen. The <br /> tag will cause the text to wrap at the same place, regardless of the visitor’s screen. Below is a sample of a sentence that is broken up by a <br /> tag.
Code:
This sentence is broken <br /> in the middle.
Output:
This sentence is broken
in the middle.
We will discuss using HTML to create links, insert images, and insert videos in later sections of this Education Channel. For more information on tags and using CSS for styling the content, please see our education channel on using CSS on your website.
Welcome