When writing HTML, you add "tags" to the text in order to create the structure. These tags tell the browser how to display the text or graphics in the document. For example, the following document has a simple layout (structure). Notice there are three major parts: a heading, two paragraphs and a bulleted list.
|
To achieve a similar layout in a WWW browser, you need to add tags. Here is the same document with HTML tags (red) added:
<html>
<head>
<title>Why I like to go swimming</title>
</head>
<body>
<h1> Why I like to go swimming in the summer. </h1>
<p> Swimming is my most favorite activity in the summer. When the sun is shining and the air is warm, you will find me dipping into my backyard pool. It’s not an impressive pool, only three feet deep, but it’s mine.</p>
<p>There are three reasons I like to swim:</p>
<ul>
<li>I get lots of exercise</li>
<li>I enjoy the freedom</li>
<li>I have an opportunity to be in the sun.</li>
</ul>
</body>
</html>
Save with a filename "myfirstwebpage.html". Notice the tags are gone? That’s because the tags tell the browser how to display files but do not show themselves.
Viewing the hidden code!
When learning something new, it often helps to see how others are doing the same thing. This is especially easy with HTML because every file that comes through your browser is formatted in HTML. So how do you see other people’s stuff? By viewing their source code. Here’s how:
- Go online
- Open Internet Explorer or Mozilla Firefox
- Enter the address to your favorite site
- Go to View on the toolbar and then click on Source for Explorer or Page Source for Navigator. In a matter of seconds, you will see the hidden code of that page.
Now that you’ve had a little taste of what it’s like to create an HTML document, it is time to begin creating one from scratch.
Download in PDF Format HERE:
No comments:
Post a Comment