Category: 

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

Article Details
  • Written By: Mary Elizabeth
  • Edited By: Bronwyn Harris
  • Last Modified Date: 04 December 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
President Richard Nixon had an entire speech prepared in case the Apollo 11 astronauts became stranded on the Moon.  more...

December 8 ,  1965 :  Pope Paul VI promulgated Vatican II into ecumenical law.  more...

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

Ad

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.

Ad

You might also Like

Recommended

Discuss this Article

anon122910
Post 1

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

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email