play the game
<Table of Contents>
Get Details on GreenGeeks Secure Hosting Learn HTML5 Today!
>>  -- CSS, Web Design, HTML, JQuery
- Bob's HTML Course - Take HTML5 Lessons - Twitter - Dave's Blog - Learn on your iPad
Web Hosting HTML Tutorial CSS Tutorial Web Design Tutorial Hosting under
I have a new 5-star iPad Course: Web Design Basics. Download your copy now from AppStore.


HTML Code MiniChapter 5: A few more tags

HTML Tutorial Chapters:  

iPage Hosting $95 Plan on sale today for $1.99/mo
Click Here for More Details!



Download my app now! You can learn how to code HTML faster with my new Interactive iPad App.

< back to the previous chapter

The center tag pretty much explains itself! The opening center tag is <center> and the closing center tag is </center>. Whatever you put between will be centered on the current line!

Example of CENTER tag...

Center Works!!!

<center><h1>Center Works!!!</h1></center>

Note: Recently, the W3C (the group that decides on HTML standards) has recommended that when writing HTML, you use <div align="center">centered text</div> instead of the center tag. Although div does not work in many older web browsers, it works in virtually all recent versions of popular web browsers. The neat thing about div is that you can align both left and right in addition to center.


Web Hosting by iPage - Affordable and E-Commerce Enabled

Get details on how to set up and configure your .com. (It only takes a few minutes.)


The HTML BODY attributes...

In Chapter 1 you learned the BODY tag. The BODY tag has many attributes... here are the most useful ones...

  • BACKGROUND="location_of_image" - Background image for web page. Example: If you have kitten.jpg in the same directory as your HTML file, use <body background="kitten.jpg"> to load it as your background image.
  • BGCOLOR="#hexadecimal_here" - Hexadecimal Color Code for Background Color
  • LINK="#hexadecimal_here" - Hexadecimal Color Code for Links (if left blank, most browsers default to blue.)
  • VLINK="#hexadecimal_here" - Hexadecimal Color Code for Links the User has Already Visited (if left blank, most browsers default to purple.)
  • TEXT="#hexadecimal_here" - Hexadecimal Color Code for Text Color
  • Click Here to Learn how to use the Hexadecimal Color System

If you are looking for special effects such as links without an underline, or links that change color when you move the mouse over them, you need to use CSS (Cascading Style Sheets) with your HTML code.

RedGreenBlue
#FF0000#00FF00#0000FF

Save Nearly $950/Year 
with Straight Talk

HTML Code - Try it Yourself!

In the Box below, type the following HTML code, then click "Check it Out!" The HTML document you made will be displayed in your browser. You may wish to change the words within the tags and the tag attributes just to try it out.

Try typing this:

<html>
<head><title>Title goes here</title></head>
<body bgcolor="#FFFFFF" link="#FF0000" vlink="#00FF00">
<h1 align=right>Body goes here</h1>
<hr>
<center><h2>Headings are very useful!</h2></center>
<div align="right">div is also a great tag!</div>
<a href="http://www.davesite.com/">This link should be red if you haven't visited davesite.com/ and green if you have.</a>
</body>
</html>



Get the Latest Phones at TracFone Wireless! View Today's Phone Deals!
Hosting CompanySpecial FeaturesHost DetailsDisk Space/
Bandwidth
Domain PricePrice (Click for More)
iPage Expert
Web Hosting
"Best Control Panel Ever"/
Enhanced Security/100% Green
Unlimited/UnlimitedFree (ever year) $7.95/mo $2.95/mo
Globat Hosting Free Blogging Software/
Easy Control Panel Setup
Unlimited/Unlimited Free (first year) $7.95/mo $4.44/mo
GreenGeeks Hosting Enhanced Security (SSH)/
North American 24/7 Support
Unlimited/Unlimited Free (every year) $6.95/mo $4.95/mo
1&1 Hosting Enhanced Security (SSH)/
Scripting, and IMAP Secure Email
250GB/Unlimited 3 Free (every year) $9.99/mo
HTML An Interactive Tutorial
Continue Next Chapter