HTML Fundamentals  © 2005 Ahmed Ebeid and Banumathy Sridharan

 

CHAPTER 1:

What is an HTML File?

Technology has enhanced communication to great levels. Today information can be conveyed across vast distances within seconds. This has been made possible by the World Wide Web(WWW). The WWW or Web is a collection of computers all over the world, which communicate with each other using a communication protocol called HTTP.

How does the WWW work?


Web pages are files which contain information to be displayed, and they are stored on computers called ‘Web Servers’. Computers reading the web pages are called ‘Web Clients’. A Web Client read the pages with a program called the ‘Web browser’. Popular web browsers are ‘Internet Explorer’ and ‘Mozilla’.

HTML is significant here, as it is a simple language to design and develop web pages.

A browser fetches a webpage from a Web Server by a request. All web pages contain instructions for display called ‘tags’. The browser reads these tags and displays the page on the Client’s computer.

The Web standards are made by a rule-making body called W3C or the World Wide Web Consortium (see Appendix to Chapter 1: W3C Standards.). They set the web standards, the most important of which are HTML, CSS and XML.

What is an HTML File?

HTML stands for Hyper Text Markup Language
An HTML file is a text file containing small markup tags
The markup tags tell the Web browser how to display the page
An HTML file must have an htm or html file extension
An HTML file can be created using a simple text editor

Structure of an HTML File

HTML comprises two major parts that give a document a well-structured look.

They are:

1- Head
2- Body

The Head contains the title of the document, and the heading - which is the heading of that particular page in the document.
The Body contains the entire content of the document.


HTML Tags

1- HTML tags are used to mark-up the file content

2- HTML tags are surrounded by the two characters < and > called angle brackets
3- HTML tags normally come in pairs like <html> and </html>, but there are single tags as well like <hr>
4- The first tag in a pair is the start tag, the second tag is the end tag
5- The text between the start and end tags is the element content
6-HTML tags are not case sensitive, <html> means the same as <HTML>. But in newer HTML standards, it is highly suggested that you keep all tags lowercase.

You are now ready to create your first HTML file!

Do You Want to Try It?
If you are running Windows, start Notepad (or start SimpleText if you are on a Mac) and type in the following text:

<html>
<head>
<title>IT Group Egypt (CTC)</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>


Save the file as "mypage.htm".
Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or

"Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.

Example Explained
The first tag in your HTML document is <html>. This tag tells your browser that this is the start of an HTML document. The last tag in your document is </html>. This tag tells your browser that this is the end of the HTML document.
The text between the <head> tag and the </head> tag is header information. Header information is not displayed in the browser window.
The text between the <title> tags is the title of your document. The title is displayed in your browser's caption.
The text between the <body> tags is the text that will be displayed in your browser.
The text between the <b> and </b> tags will be displayed in a bold font.

  Appendix to Chapter 1: W3C Standards.

  Review Quiz

  Practice questions

  Assignments

  Readings

[Your opinion is important to us. If you have a comment, correction or question pertaining to this chapter please send it to appropriate person listed in contact information or visit forums for this course.]

Previous: Foreword Next: HTM or HTML Extension