22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

96<br />

Part II: Formatting Web Pages with (X)<strong>HTML</strong><br />

To avoid problems with files on your Web site, follow a standard naming<br />

convention. Often, using only lowercase letters can simplify your life.<br />

✓ Check the extension. Bios.htm and Bios.html are two different<br />

files. If your link’s URL uses one extension and the actual filename uses<br />

another, your link won’t work.<br />

To avoid problems with extensions on your Web site, pick either .html<br />

or .htm and stick to that extension.<br />

✓ Check the filename. For example, bio.html and bios.html are two<br />

different files.<br />

✓ Copy and paste. Avoid retyping a URL if you can copy it. The best and<br />

most foolproof way to create a URL that works is as follows:<br />

a. Load a page in your browser.<br />

b. Copy the URL from the browser’s address or link text box.<br />

c. Paste the URL into your (X)<strong>HTML</strong> markup.<br />

The copy-and-paste method for grabbing URLs presumes that you’re grabbing<br />

them from a Web site somewhere. If you open a local file on your PC in<br />

a browser, you’ll see something that looks like this: file:\\\I:\H4D6e\<br />

html_letter.html. Here’s how to decipher it all:<br />

✓ file:\\\ is an Internet Explorer convention used to identify the document<br />

as a file in your local file system.<br />

✓ I:\ is a drive letter.<br />

✓ H4D6e\ is a folder or directory on that drive.<br />

✓ html_letter.html — the rightmost text element, in this case — is the<br />

name of the <strong>HTML</strong> file you opened.<br />

You can’t use URLs like this on a Web site, so please — don’t try to!<br />

Most of us have had a letter returned to us at least once marked undeliverable<br />

because of an incomplete or inaccurate address. When the address isn’t<br />

correct, the post office has no way of knowing how to locate the intended<br />

recipient. The same is true for URLs. Without a fully formed URL, Web servers<br />

don’t know how to locate the target Web page. URLs generally take the<br />

following form:<br />

✓ Protocol identifier followed by a colon (:) — This is generally either<br />

http for Hypertext Transport Protocol, https for secure-server sites,<br />

or ftp for file transfer sites.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!