We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is the Proper Way to Use an HTML Code Tag?

Mary Elizabeth
By
Updated: May 16, 2024

HTML is the standard abbreviation for Hyper Text Markup Language, a means of structuring documents that are used to create web pages. The structure is created by enclosing each bit of page text with an opening and closing HTML code tag that together define the element that is to appear at that point in the document. HTML code tags that stand alone are also used to perform other functions. For the material to appear as desired, each HTML code tag must be properly structured and placed in proper relationship to other code tags and to content.

There are several key steps in forming an HTML code tag. First, a tag must begin with the symbol <, which is sometimes called a “less-than sign” and sometimes called a “left angle bracket.” It must end with the symbol >, which is sometimes called a “greater-than sign,” and sometimes called a “right angle bracket.” This is the case whether the HTML code tag is an opening tag, a closing tag, or a stand-alone tag.

In some cases, an HTML code tag stands alone with its content. This is the case, for example, with the tag <br>, which creates a line break. There is no need for a paired closing tag for this function. When code tags work in pairs as an opening and a closing tag, there is another requirement. In this case, the left bracket of the closing tag must be followed by the forward slash sign /. For example, to make material appear as boldface, the content of the HTML code tag is the letter b, so the HTML rendering would look like this:

<b>the words I want to be bold</b>

The material within the brackets of an HTML code tag is always specified, sometimes by exact material, like b for bold, and sometimes by the class of item that must be included. For example, to create a hyperlink, a URL for a web page—any web page you like—must be specified inside of the opening HTML code tag, while the word(s) you want the reader to see are placed between the opening and closing tags like this:

<a href=”http://websiteofyourchoice.com/”>words the reader sees</a>

To make this work, you replace the URL with the URL you want the link to go to and replace “words the reader sees” with the words you want in place. Notice that besides the letter a, that appears in the closing tag, the opening tag has a space, the designation href, an equal sign, and opening and closing quotation marks around the URL. All of these elements are necessary for the HTML code tagging to work properly.

EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Mary Elizabeth
By Mary Elizabeth
Passionate about reading, writing, and research, Mary Elizabeth is dedicated to correcting misinformation on the Internet. In addition to writing articles on art, literature, and music for EasyTechJunkie, Mary works as a teacher, composer, and author who has written books, study guides, and teaching materials. Mary has also created music composition content for Sibelius Software. She earned her B.A. from University of Chicago's writing program and an M.A. from the University of Vermont.
Discussion Comments
By anon122910 — On Oct 30, 2010

Each page must define its document type, always close HTML tags except self-closing tags, proper nesting required, be careful about attributes and at last validate your page.

Mary Elizabeth
Mary Elizabeth
Passionate about reading, writing, and research, Mary Elizabeth is dedicated to correcting misinformation on the...
Learn more
Share
https://www.easytechjunkie.com/what-is-the-proper-way-to-use-an-html-code-tag.htm
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.