PromotionalEzineArticles.com

Home

Contact Us

Author Guidelines

Terms of Service

New Member?

Author Login


Categories



Advertising
Automotive
Business
Computer
Entertainment
Finance
Food
Health
Home & Family
Internet
Legal
Science
Self Improvement
Shopping
Society
Sports
Travel
Writing
  Online Articles
  Public Speaking



Partners
Imprinted Key Tags
Promotional Sewing Kits
Promotional Calculators
Key Rings
Screwdrivers
Sport Bottles
Imprinted Frisbees
Flyswatters
Imprinted Totes
Imprinted Athletic Bags
Candy
Custom Badgeholders
Canholders
House Key Chains
Custom Calculators
Promotional Lint Removers
Dress Shirts
Tape Measures
Imprinted Tote Bags
Plasitc Mugs

E-mail this article E-mail this article
Report this article Report this article
Publish this article Publish this article
PromotionalEzineArticles.com - Writing - Online Articles

A Simple HTML Tutorial for Online Authors

by David Hougland - WebVector.net Website Services - Last Modified: 10/31/2007

ost article sites that are open to the public allow a limited number of simple HTML tags to be used in your articles for formatting and emphasis purposes, but knowing how to use these tags effectively may require a little explanation. After you have used them a few times and previewed the results, it will become obvious how they work and you may use them often.

The simplest of these tags are used for displaying text as bold or italic for emphasis. There are two tags for creating bold text, <b> and <strong>. One of these is called a logical attribute, and the other is a physical attribute. At one time, many browsers treated these attribute types differently, but with most modern browsers, the difference has become irrelevant and the two tags are treated the same way.

To make text bold, you must have the start bold tag above just before the bold text, and an end bold tag immediately following the bold text. The end bold tag looks like this: </b>. These formatting tags are used in pairs, one to tell the browser where to start the bold text, and a second one to tell the browser where to end the bold text.

So to make a single word in a sentence bold, you would type it in like this:
This is <b>bold</b> text.
And the sentence would come out looking like this:
This is bold text.

Italic text works the same way with the start italic (<i>) and end italic (</i>) tags. These tags also have physical attribute counterparts (<em> and </em>), but like the bold tags, these are interchangeable in modern browsers. To make a single word in a sentence italic, you would type it in like this:
This is <i>italic</i> text.
And the sentence would come out looking like this:
This is italic text.

These tags may also be combined to produce another effect. By nesting the tags above, you can create text that is both bold and italic. To make words in a sentence bold and italic, you would type it in like this:
This is <b><i>bold and italic</i></b> text.
And the sentence would come out looking like this:
This is bold and italic text.

As illustrated above, when you nest tags to get text that is both bold and italic, you should end the tags in reverse order. Like in the example, if you open the bold tag first, you should close it last. If you open the italic tag last, you should close it first. When nesting HTML tags, the rule is, "First in, last out."

In each case, it is very important to remember the end tag. If you omit it, all of your text from the point where you invoked bold or italic text to the end of your article will be affected. This is one good reason to use the preview often while creating your article. You may think you've used the tags correctly, but problems like this will be visually obvious when you see the page rendered in a browser.

The other tags that are commonly permitted on article sites are for creating lists. Many people try to create simulated lists by typing in a number or some bullet character followed by the sentence or other list item. They often try to pad the line out by including multiple spaces or tabs. The results of this approach will be disappointing for more than one reason.

If you use numbers for your list items, they will not line up correctly using a proportional font, especially if you get into two-digit numbers, which will give your list a jagged appearance. Long sentences will wrap in a way that is inconsistent with list formatting, causing your bullets to be lost in a sea of lines that all begin at the extreme left. Padding your lines out with tabs or multiple spaces doesn't work because browsers ignore these characters. Browsers will render tabs or multiple tabs as a single space, and they will render multiple spaces as a single space. You can put ten tabs or twenty spaces in the middle of your line, but when you view the page in a browser, all you will see is a single space. This makes getting your simulated list to align properly impossible. Fortunately, all of these problems can be solved by using the HTML list tags which are supported by most article sites.

A simulated list might look like this:

1. This is list item one.
2. This is list item two.
3. Number three is an extra-long list item that illustrates the behavior when the line wraps. If many lines wrap within the list, it won't even look like a list anymore.
4. This is list item four.

The same items in an HTML list will look like this:

  1. This is list item one.
  2. This is list item two.
  3. Number three is an extra-long list item that illustrates the behavior when the line wraps. This is what you expect to see when a line wraps within a list.
  4. This is list item four.
The two most common HTML list types are the ordered list, in which each line begins with a number, and the unordered list, in which each line begins with a bullet. The tags for starting these list types look like this: <ol> for an ordered list, and <ul> for an unordered list. Then, each item in the list must be surrounded by the start and end list item tags. These tags look like this: <li> and </li>. Finally, the list must end with the end list tag for that list type: </ol> or </ul>.

So, to create the sample ordered list seen above with the same list items in an unordered list, you would type it in like this:
<ul>
<li>This is list item one.</li>
<li>This is list item two.</li>
<li>Number three is an extra-long list item that illustrates the behavior when the line wraps. This is what you expect to see when a line wraps within a list.</li>
<li>This is list item four.</li>
</ul>

And the list would come out looking like this:

  • This is list item one.
  • This is list item two.
  • Number three is an extra-long list item that illustrates the behavior when the line wraps. This is what you expect to see when a line wraps within a list.
  • This is list item four.
As seen here, an HTML list is automatically preceeded and followed by a blank line. A special case is the anchor tag, or 'a' tag. This tag is used to create clickable hyperlinks in your article that will direct the browser to another web address. Some sites do not permit the anchor tag for security reasons, others allow them only in certain places or limit the number of them in each article. If you include anchor tags in your article, you may have to modify or even remove them before submitting the article to some sites.

The anchor tag to create a basic link to Google looks like this:
<a href="http://www.google.com">Go to Google!</a>
And the link would look like this:
Go to Google!

On most article sites that permit the 'a' tag, the referenced resource will open in a new browser window. To modify the anchor tag shown above, simply change the value of the 'href' attribute to the url of your choice, and change the anchor text between the start and end tags with a text string that will indicate what resource the link points to. For example, to create a link to my own home page, the tag would be:
<a href="http://www.webvector.net">Visit WebVector.net Website Services!</a>
And the link would look like this:
Visit WebVector.net Website Services!

A little bit of experimenting with these tags and seeing the result in the preview will make it clear how they work, but this should give you a head start. With a little practice, you will use these simple tags as easily as you use your mouse. However, the real need for emphasis in your text using bold or italics is limited, and you may find that you use them less than you might think. When you really need it, it's good to have the ability to produce bold or italicized text, but just like in this article, mostly you don't need it.


David HouglandDavid is a Perl and PHP programmer for web-based database applications. He is the programmer responsible for the functionality and interface design of IncredibleArticles.com.


This article has been viewed 461 times.

You may reprint this article. The HTML code below can be copied and pasted into your page to recreate the article in its simplest form with no formatting. Simply click inside the box, or right-click the box and choose Select All to select the entire contents. Then press Ctrl->c on your keyboard to copy the text to your clipboard. You can then paste it into the code for your own page.
You may modify the simple HTML tags in this code to suit your formatting needs, but the article title, byline, content, author bio and source credit must remain unchanged, and all links must be retained as active hyperlinks. You may not use images from our site.
Copyright ©2007 PromotionalEzineArticles.com