Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

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

Mary Elizabeth
Mary Elizabeth
Mary Elizabeth
Mary Elizabeth

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.

HTML code is used to create web pages.
HTML code is used to create web pages.

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.
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.

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.

Mary Elizabeth
Mary Elizabeth

Mary Elizabeth is passionate about reading, writing, and research, and has a penchant for correcting misinformation on the Internet. In addition to contributing articles to EasyTechJunkie about art, literature, and music, Mary Elizabeth is a teacher, composer, and author. She has a B.A. from the University of Chicago’s writing program and an M.A. from the University of Vermont, and she has written books, study guides, and teacher materials on language and literature, as well as music composition content for Sibelius Software.

Learn more...
Mary Elizabeth
Mary Elizabeth

Mary Elizabeth is passionate about reading, writing, and research, and has a penchant for correcting misinformation on the Internet. In addition to contributing articles to EasyTechJunkie about art, literature, and music, Mary Elizabeth is a teacher, composer, and author. She has a B.A. from the University of Chicago’s writing program and an M.A. from the University of Vermont, and she has written books, study guides, and teacher materials on language and literature, as well as music composition content for Sibelius Software.

Learn more...

Discussion Comments

anon122910

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.

Post your comments
Login:
Forgot password?
Register:
    • HTML code is used to create web pages.
      By: alexeysmirnov
      HTML code is used to create web pages.
    • 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.
      By: spaxiax
      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.