Free Notes | Amazing Pictures | Photoshop Tutorials | Drafting and Drawing Tutorials | HTML Tutorials for FREE

Sunday, July 18, 2010

Chapter 1: What is HTML?

HTML stands for HyperText Markup Language. Developed by scientist Tim Berners-Lee in 1990, HTML is the "hidden" code that helps us communicate with others on the World Wide Web (WWW).
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.






head.jpg (1034 bytes)
Why I like to go swimming in the summer. 

paragraph.jpg (1406 bytes)
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.

paragraph.jpg (1406 bytes)
There are three reasons I like to swim:


list.jpg (1101 bytes)


  • I get lots of exercise 
  • I enjoy the freedom
  • I have an opportunity to be in the sun.




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>

head.jpg (1034 bytes)
<h1>
Why I like to go swimming in the summer. </h1>

paragraph.jpg (1406 bytes)
<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>

paragraph.jpg (1406 bytes)
<p>
There are three reasons I like to swim:
</p>
list.jpg (1404 
bytes)
<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.
By viewing the source code, you can see what the "big" guys are doing. In fact, viewing other people’s code is considered one of the best ways to learn how HTML works.
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: