HTML (Hypertext Markup Language) is the lingo of the internet. It is the medium for web designers to essentially explain to web browsers how to present information to users of the Internet. Using a reference to the former predominant information medium, newspapers, you can think of HTML in the context of a newspaper editor determining the typesetting and layout for an upcoming circulation. The design staff would spell out page formats for various parts of the newspaper by determining fonts, positions, image locations, section layouts and other details. The delivered product would be the result of the determination by the designers to use a size 50, Times New Roman font for the newspaper’s title, to include certain pictures and captions associated with stories and headlines, and to organize other aspects of the newspaper’s layout according to a model.
HTML works similarly. The vocabulary understood by browsers includes markup tags such as
- to create lists. HTML obviously has much more capability than a newspaper. The ability to quickly move between pages by following web links is a major advantage that web pages and the internet in general offer as an information medium. Anyone who’s used the internet to check email, make a payment, or look up an address or phone number knows that HTML and related web technologies facilitate significant interaction between the user and the information supply.
A Simple Example
This exercise will give you a basic introduction to how HTML works. On your computer open the Notepad program by going to Start Menu->All Programs->Accessories->Notepad. When the Notepad editor comes up, type (or paste) the following:
My First Web Page
Enter text here:
What’s your favorite food?
Now save the file using the name “html-example.html”. After you save the file, open a web browser (Internet Explorer and Firefox are the two most popular), then open the file you just created by using the File->Open… or File->Open File… command in the browser.
So how did all those tags turn into what you see in your browser? I will explain.
HTML segments are typically opened by a start tag and closed by an end tag. The first tag you’ll see in an HTML page is the
. The ‘/’ included in the end tag tells the browser, “This is where the html tag ends.” Although it isn’t always necessary to close all HTML tags that have been opened, it’s best to explicitly provide a closing HTML tag for each tag opened. HTML tags can be, and very often are, nested inside of other tags. For example, every HTML tag on a page is nested inside of the
There are two main tags that divide an HTML document into its major sections. After the
Common HTML Tags
Following our example above, the paragraph (
The last two items included in our example HTML document are interesting. To allow for interaction between the user and the web page, various kinds of user input tags exist as part of the web markup language. The first one in our example,
The last item in our HTML example, a drop-down box, is created using the