HTML Comp
HTML Comp
What is HTML?
The opening and closing tags use the same command except
the closing tag contains and additional forward slash /
For example, the expression <B> Warning </B> would cause
the word ‘Warning’ to appear in bold face on a Web page
Nested Tags
Whenever you have HTML tags within other HTML tags, you
must close the nearest tag first
Example:
<H1> <I> The Nation </I> </H1>
Structure of a Web Page
Choose the title of your Web page carefully; The title of a Web
page determines its ranking in certain search engines
The title will also appear on Favorite lists, History lists, and
Bookmark lists to identify your page
Text Formatting
The ALIGN attribute can be inserted in the <P> and <Hn> tags
to right justify, center, or left justify the text
For example, <H1 ALIGN=CENTER> The New York Times
</H1> would create a centered heading of the largest size
Comment Statements
<HTML>
<HEAD>
<TITLE> Example </TITLE>
</HEAD>
<BODY BGCOLOR=“black” TEXT=“white”>
<BASEFONT SIZE=7>
This is where you would include the text and images on
your Web page.
</BODY>
</HTML>
Attribute Value Description
behavior scroll Defines the type of scrolling.
slide
alternate
A link lets you move from one page to another, play movies
and sound, send email, download files, and more….
A link has three parts: a destination, a label, and a target
To create a link type
<A HREF=“page.html”> label </A>
Anatomy of a Link
<HTML>
<Head><Title>Image links</Title></Head>
<BODY>
Click here
<a href="D:\T Table.png">
<img src="C:\Users\aamir\Documents\Scanned
Documents\welcome scan.jpg" height=100 width=100>
</a>
</BODY>
</HTML>
Ordered Lists
There are two basic components of a Web form: the shell, the
part that the user fills out, and the script which processes the
information
HTML tags are used to create the form shell. Using HTML
you can create text boxes, radio buttons, checkboxes, drop-
down menus, and more...
Example: Form
Text Box
Drop-down Menu
Radio Buttons
Checkboxes
Text Area
Reset Button
Submit
The Form Shell
<B>Comments?</B>
<BR>
<TEXTAREA NAME="Comments"
ROWS=10 COLS=50 WRAP>
</TEXTAREA>
Creating Radio Buttons
VALUE="Navy">Navy
<INPUT TYPE="checkbox"
NAME="Color"
VALUE="Black">Black
Creating Drop-down Menus