1.866.PIXELMILL (1.866.749.3564 US/Canada)

Search Support

Search our knowledgebase? Enter keywords or article id:

> go to search support


Support Index


Help and Support


Search

Go back to search results

Enter keyword or id#:




Promotions


Quick Links

Printable Article

Basic HTML Tags

Article ID: KB101442

HTML

Your HTML document should always start with "<html>" and end with "</html>."

HEAD

Inside your HTML tags, you should have the HEAD element: <head> .... </head>. The HEAD element contains information about the document. For example, the HEAD element may contain the TITLE element, as well as other types of tags that provide more description about the site that may be used by search engines.

TITLE

The TITLE element is nested inside of the HEAD tags. It looks something like this:

<title>This is the title of a page.</title>

Titles should be descriptive! In fact, many search engines place a high ranking on how "relevant" your title is compared to the rest of the content on your page. So instead of:

<title>Introduction</title>

A better title would be:

<title>Introduction to Australian Shepherds</title>

BODY

The BODY element usually comes after the HEAD element, and contains everything that will show up in the browser window. We'll be talking more in the next tutorials about things that can go in the BODY, but for now let's discuss some of the attributes.

* Attributes that are marked with "*" mean that the attribute is "deprecated." This means that while it will still work, you're encouraged not to use it.

BODY - Attributes
onload
="[script]"
This is typically used for running a script, such as a JavaScript function, when the window first loads.
onunload
="[script]"
This is typically used for running a script, such as a JavaScript function, when the user leaves the page.
background*
="[image path]"
This allows you to tile a background image. This attribute is deprecated. You are recommended to get the same effect using style sheets.
bgcolor*
="[colorcode]"
This allows you to set the background color of a page. This attribute is deprecated. You are recommended to get the same effect using style sheets.
text*
="[colorcode]"
This allows you to set the normal text color for the page. This attribute is deprecated. You are recommended to get the same effect using style sheets.
link*
="[colorcode]"
This allows you to set the hyperlink color for links on the page. This attribute is deprecated. You are recommended to get the same effect using style sheets.
vlink*
="[colorcode]"
This allows you to set the color for hyperlinks that have been visited by the user. This attribute is deprecated. You are recommended to get the same effect using style sheets.
alink*
="[colorcode]"
This allows you to set the color for hyperlinks that are "active," or being clicked, by the user. This attribute is deprecated. You are recommended to get the same effect using style sheets.

Putting it all together...

In the intro articles, we showed you how to create a basic HTML page. We'll take the same page but add a background color and different text color. Open a new text document (in NotePad or SimpleText) and type in the following:

<html>
<head>
<title>A page with black background and yellow text</title>
</head>
<body bgcolor="#000000" text="#ffff00">
This page has a black background and yellow text, simply by setting some attributes in the BODY tag. Please note that you can do the same thing using style sheets, which is actually a much more efficient way of setting colors. Style sheets are recommended - this method is not!
</body>
</html>

Save the document as "blackpage.htm," then open it in your web browser to view it. You'll see something like this:

See live example!

In the next tutorial, we'll look at how to start adding text to your page!


Was this helpful?

Please rate this article:

Not helpful Very helpful
1 2 3 4 5 6 7

Email address: (not required)

(Please provide your email address if you would like PixelMill support to follow-up with you about your comment. You're email address is NOT REQUIRED to submit a comment.)

Comments: (How can we improve this article?)


Clicking "Submit" will not clear this page.


link to this page: http://www.pixelmill.com/support/al1065/kb101442.htm
permalink to this article: http://www.pixelmill.com/support/kb101442.htm

Back to top

Items you recently viewed:


pm46519htdl1
$98.00

pm45887dwdl1
$94.00

pm45779fpdwtdl1
$87.00

pm46207fpdwtdl1
$98.00


PixelMill EDU

Introducing...

PixelMill EDUâ„¢ is an innovative and proprietary online training series designed to aid the do-it-yourself Web builder in transitioning to new Web editors, coding standards, and Web technologies.

Webinars and Seminars:

FrontPage to SharePoint Designer Series
This is a 6-Week series designed to give you strong exposure to the new SharePoint Designer web editor and interface, along with examples of working with Windows SharePoint Services and tips for transitioning from FrontPage.
Register Now!

Tables to Tableless CSS Series
This is a 6-Week series designed to help you transition from building Tables-based Web site layouts to working with CSS to edit and build Tableless Web site layouts. For all Web builders using Dreamweaver, Expression Web, or any other web editor.
Register Now!

FrontPage to Expression Web Series
This is a 6-Week series designed to give you strong exposure to the new Expression Web software and interface, along with tips for transitioning from FrontPage.
Register Now!

Learn more and register!

ADVERTISEMENT
adventisement