Saturday, August 22, 2009

What is HTML?

What is HTML?
HTML ( H yper T ext M arkup L anguage) is the language used to write Web pages. You are looking at a Web page right now.
You can view HTML pages in two ways:
· One view is their appearance on a Web browser, just like this page — colors, different text sizes, graphics.
· The other view is called "HTML Code" — this is the code that tells the browser what to do.
Here is the difference between HTML code and a browser display:
HTML Code Browser Display
I want to emphasize this! I want to emphasize this!

The code on the left creates the browser display on the right.
Letters and words that are enclosed in "<" and ">" marks are called "tags." They tell the browser what to do:
· The tag tells the browser to make bold text.
· The
tag means to stop making bold text.


What is a tag?
In HTML, a tag tells the browser what to do.
When you write an HTML page, you enter tags for many reasons — to change the appearance of text, to show a graphic, or to make a link to another page.
The tags you write are not visible on the browser, but their effects are.
Tags begin with the symbol "<" and end with ">".
Tags usually come in pairs, one that begins an action and one that ends it.
This tag: starts printing italicized text.
This tag:
stops the effect of a previous tag. Note the "/".
To italicize a word, you simply put before the word and after it:
HTML Code Browser Display
I want to italicize this! I want to italicize this!



What is the simplest HTML page?
Here is the very least HTML code that can be called a page:
HTML Code Browser Display
This is my page title! This is my message to the world! This is my message to the world!

You don't need to know the meaning of all these tags.
Always type a title between the and tags. This title will appear at the top of the browser display.
Your page contents go between the and tags.
You can type this code in any text editor or word processor, and if you save it as plain text with a file suffix of .html (example: mypage.html), you can view it with a browser.
After you have created a simple page using a text editor, you should consider getting a better HTML editor. There are lots of them. I even wrote one — it is called Arachnophilia , and it doesn't cost you any money.


What is a Hypertext link?
A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination.
There are two parts to a link:
· One part tells the human what to do.
· The other part tells the browser what to do.
Here is an example:
HTML Code Browser Display
Go to Microsoft Go to Microsoft

In this example, the phrase "http://www.microsoft.com" tells the browser what the link's destination is, and the phrase "Go to Microsoft" tells the human what is happening.
The link on the right is real — if you press it, you will go to Microsoft's Web site.
If you want to make a link to one of your own pages, just use the name of the page without the "http://" prefix:
HTML Code Browser Display
Go to the Arachnophilia Home Page Go to the Arachnophilia Home Page


How do I put a graphic image on my page?
Use the IMG tag. Here is an example:



This is a very easy tag to use, but take these precautions:
1. If the name of the graphic file is in UPPERCASE, then type the name into the IMG tag in UPPERCASE also. If it is lowercase, type the name in lowercase. Case errors won't matter on your home computer, but when you load your page and graphics onto the Web, suddenly the graphics won't show up any more. This is because Windows and other popular home operating systems do not care whether the file names have the right case, but Web servers do.
2. If you want to simply type in the graphic file name as shown here, the graphic file must be in the same directory as your Web page.
3. You can't use just any graphic file on your page. You should limit yourself to GIF and JPG files — most current browsers can display these graphics correctly, and they are also efficient to store on your page and to download from the Web.

No comments:

Post a Comment