HTML Word
HTML Word
HTML tags are keywords (tag names) surrounded by angle brackets like <html>
The first tag in a pair is the start tag, the second tag is the end tag
The end tag is written like the start tag, with a forward slash before the tag name
Start and end tags are also called opening tags and closing tags
Two subparts:
Head
Within the head, more tags can be used to specify title of the page,
meta-information, etc.
Body
The HEAD of your document point to the part of your browser window. The TITLE of
your document appears in the very top line of the user’s browser. If the user chooses
to “Bookmark” your page or save as a “Favorite”; it is the TITLE that is added to the
list.
The text in your TITLE should be as descriptive as possible because this is what many
search engines, on the internet, use for indexing your site.
Inside the BODY element, heading elements H1 through H6 are generally used for
major divisions of the document. Headings are permitted to appear in any order, but
you will obtain the best results when your documents are displayed in a browser if
you follow these guidelines:
1. H1: should be used as the highest level of heading, H2 as the next highest, and so
forth.
2. You should not skip heading levels: e.g., an H3 should not appear after an H1, unless
there is an H2 between them.
The <HR> element causes the browser to display a horizontal line (rule) in your
document.<HR> does not use a closing tag, </HR>.
How to insert an image:
o Height and width attributes set the size of the image on the webpage.
Hyperlink
Hyperlink is a highlighted text or image that stores the address of some other web
page/document. When we click on any hyperlink, the linked document gets opened.
The href attribute of the <A> tag stores the reference of the document that is to be
linked.
The text that appears on the hyperlink is enclosed between the starting tag <A> and
ending </A>
Body tags
Paragraphs allow you to add text to a document in such a way that it will
automatically adjust the end of line to suite the window size of the browser in which
it is being displayed. Each line of text will stretch the entire length of the window.
Alignment
Some elements have attributes for alignment (ALIGN) e.g. Headings, Paragraphs and
Horizontal Rules.
Follow the 4 steps below to create your first web page with Notepad.
Start
All Programs
Accessories
Notepad
Type your HTML code into your Notepad: (Example given below)
<html>
Try the following HTML code on your computer:
<head>
<title>Title
HTML CODE: of page</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
<h1> First Heading </h1>
<h2> First Heading </h2>
<h3> First Heading </h3>
<h4> First Heading </h4>
<h5> First Heading </h5>
<h6> First Heading </h6>
Step 3: Save Your HTML
</body>
Select Save as.. in Notepad's file menu.
</html>
When you save an HTML file, you can use either the .htm or the .html file extension.
There is no difference, it is entirely up to you.
Start your web browser and open your html file from the File, Open menu, or just browse
the folder and double-click your HTML file.
The result on the browser:
HOME WORK: Refer to the above notes and the PPT on HTML tags , copy the
following questions and answer them in your class work.