Tuesday, December 28, 2010

Practical 01 - A first HTML Document

1) Writing Tools:
 We don't need to spend hours to start our first HTML document. HTML is simple to read and understand, and it's simple to write, too.
 Let's get started...
As you know well our much focus will be writing HTML manually using plain text editors:
For MS-Windows Notepad,
We can test out HTML document using locally installed (or OS integrated) web-browsers, like
Internet Explorer or other.
*Note:
 (1) While saving files in Notepad either enclose file names (along with extension either .html or .htm)      within double quotes. For e.g. "firstpage.html"
 (2) write filenames attached with extension .html or .htm and set Save as Type to --All Files (*.*)--

2) A First HTML Document
 Like every programming language book often starts off with a simple example on how to display message "Hello World". so here it is:
<html>
<head>
<title>My first HTML document</title>
</head>
<body>
 <!-- this is way of writing comment -->
<h2>My first HTML document</h2>
Hello, <i>World Wide Web!</i>
</body>
</html>
Save this file as instructed above i.e. file with extension .html or .htm. Then you may double to open the file in the web-browser.

3) Lesson of this simple HTML document
 Every HTML document will have common skeleton. In grade 9, we will mostly work on BODY part of the HTML document.
 HTML basic Skeleton:
 <HTML>
 <HEAD>
  <!--scripts and web-page title that displays on Title bar is written here-->
  <TITLE>Tilte </TITLE>
 </HEAD>
 <BODY>
  <!--content with HTML defined structures which can be viewed on the browser screen is written here-->
 </BODY>
 </HTML>

Remember HEAD and BODY are the two main parts of every HTML documents that comes one after another.

No comments:

Post a Comment