create profitable web site design
web site design help
create profitable business web sites
GET INSTANT ACCESS TO THE WORLD'S
GREATEST SOFTWARE - FOR FREE!

Programs that will PERSONALIZE your PC experience...
PROTECT your online privacy... UNLEASH your creativity...
Programs that will help you COMMUNICATE better...
[ Save Time. Save Money. There's NO Catch. ]


 

Understanding HTML in Just 5 Steps
SolveYourProblem.com Article Series: Web Site Design

    

HTML is a relatively simple language, but that doesn't stop people from having problems with it. Why is that? It's mainly because, while the HTML tags themselves are easy, creating an HTML document that works as intended on a web server requires you to know a few extra things that aren't often explained. Here, then, is a guide to understanding those parts of HTML that they just don't tell you about in the books.

Step 1: Understand Doctypes

It isn't often noted that valid HMTL documents don't actually start with the <html> tag – they have one extra tag before it. This is the doctype, and it must be present right at the top of your document for it to be valid HTML.

There are only really two doctypes that you really need to know about. The HTML4 doctype looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

The XHTML one looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

These versions of the doctypes that are a little more forgiving – if you're a purist, you can use the strict ones instead by changing the words 'transitional' and 'loose' to 'strict'.

But what is the doctype for? Well, its purpose is simple enough: it tells web browsers exactly what version of HTML your page was written in, to help them to interpret it correctly.

Step 2: Understand HTTP Errors

A truly shocking number of people writing HTML pages don't know how HTTP works – and they quickly run into trouble because of it. HTTP is the way a web browser communicates with a web server, and this communication includes information about your pages, such as cookies.

You don't need to worry too much about the internals of HTTP, but it's worth knowing that it works by the browser sending a request to the server for a certain page, and the server then responding with a code.

Your website should be set up to handle error codes well. For example, a 404 (page not found) error should show a page with links to the most useful parts of your site. Other common error codes include:

200 – OK.

301 - Page moved.

403 - Forbidden (no authorisation to access).

500 - Internal server error.

For more information, visit www.w3.org/protocols.

Step 3: Understand MIME Types

MIME types are another part of the HTML header – an important one. Also known as the content-type header, they tell the browser what kind of file they are about to send. Browsers don't rely on HTML files ending in .html, JPEG images ending in .jpeg, and so on: they rely on the content-type header. If you don't know about this, you can have problems if you need to configure your server to send anything unusual.

Here are some common MIME types:

text/html - HTML.

text/css – CSS.

text/plain - plain text.

image/gif - GIF image.

image/jpeg - JPEG image.

image/png - PNG image.

audio/mpeg - MP3 audio file.

application/x-shockwave-flash - Flash movie.

Step 4: Understand Link Paths

One of the hardest things to understand about HTML is all the different things that you can put in an 'href' property. Abbreviated URLs are created using the rules of old text-based operating systems, and there are plenty of people writing HTML today who are completely unfamiliar with these rules.

Here are some examples. For each one, the assumption is that the link is on a page at http://www.example.com/example1/example1.html.

<a href="example2.html"> - links to http://www.example.com/example1/example2.html
< a href="./example2.html"> - links to http://www.example.com/example1/example2.html
< a href="../example2.html"> - links to http://www.example.com/example2.html
< a href="/example2.html"> - links to http://www.example.com/example2.html
< a href=".."> - links to http://www.example.com/
< a href="."> - links to http://www.example.com/example1

To put it simply, one dot means "in the folder we're in now", while two dots means "in the folder above the one we're in now". This can get confusing fast – just look at the difference one dot can make! Be careful with it.

Step 5: Understand How to Insert Things That Aren't HTML

One of the most common HTML questions is how to insert things like Javascript and CSS into an HTML document. This is one of the easiest questions to answer: you simply use the link and script tags, like this:

<link rel="stylesheet" type="text/css" href="default.css" />
< script src="scriptname.js" type="text/javascript" language="javascript"></script>

# # # # #

SolveYourProblem.com : 2007

> Home > Website Design Articles: Main Page

 

 

Like This Article?
Want More?

Click Here To
Connect To
This Channel's
Index Page.

   

Hot Channels
For The Past 7 Days:

Web Design Tips
(451 views)
Web Conferencing
(398 views)
iPod
(376 views)
Spyware
(292 views)
Podcasting
(292 views)

Bluetooth
(258 views)
Web Hosting
(248 views)
Internet Security
(232 views)
VoIP
(227 views)

Top How-To's
For The Past 7 Days:

Unfreeze Your iPod
(52 views)

Delete Songs From
Your iPod

(40 views)

Difference Between
Websites & Blogs

(22 views)

Blogging:
Libel & Slander

(16 views)

Browser Hijacker
(15 views)

Sharing a
Wireless Internet
Connection

(15 views)

2 iPods,
1 Computer

(14 views)

iPod Basics
For Beginners

(12 views)

Convert Analog TV
To HDTV

(12 views)

Connecting
Bluetooth
Products

(12 views)

[ more... ]

 

What's Hot in Business & Marketing:

The Most Complete
Internet Business Start-up
System Ever Created...

You Can Launch Your Own Internet
Business In As Little as 48 Hours.
[ Take a 100% Risk-Free Test Drive ]
"BLOGGING FOR DOLLARS"
Starting your own online business has
never been easier! You can set up your
FIRST blog in 45 seconds...

5 minutes if you're slow.
Shocking case studies and test results.

[ Start Making Money Today ]
SELF EMPOWERMENT
Learn how to gain complete control over
your life & get everything you want.
"This is 4 STAR Life Improvement."
The easiest, most practical way to make
massive changes in your life right now.
[ Receive Dare To Dream Today ]

Home | Self Improvement | Small / Home Business | Merchant Accounts | Advertising | Technology | US Elections & Politics
Relationships / Dating | Autos | Gardening | Home Improvement | Pets / Animals | Shopping / Hobbies | Sports | Travel
Directory / All Channels | RSS / XML Feed | Contact | Site Map

SolveYourProblem.com Downloadable "How-To" Guides

AddThis Social Bookmark Button      AddThis Feed Button

© Launch 3, LLC All Rights Reserved