HTML
HTML
HTML stands for Hypertext Markup Language. HTML is not a programming language; it is a markup
language. A markup language is a collection of markup tags. HTML uses markup tags to describe Web
pages. HTML Tags are keywords surrounded by angle brackets like <HTML>. HTML tags are
normally comes in pairs, like <b> and </b>. The first Tag in a pair is the start tag, the second tag in a
pair is the end tag. Start and End tags are also called opening tag and closing tag. It is used for creating
static web pages.
Advantages of HTML:
It is widely used
Every browser supports HTML language
Easy to learn and use
It is by default in every windows so you don’t need to purchase extra software
Structure of HTML page:
All HTML pages consist of head and a body.
The Head is used for text and tags that do nots show directly on the page
The Body is used for text and Tags that are show directly on the page.
Finally, all web pages have an <html> tag at the beginning and the end, telling the browser where the
document starts and where its stops.
The most basic code the code you will use for any page you make, is shown below:
<html>
<head>
<!---This section is for the title and technical info of the page---!>
</head>
<body>
<!----This section is for all that you want to show on the page---!>
</body>
</html>
The head section of the webpage includes all the stuff that does not show directly on the resulting page.
The <title> and </title> tags encapsulate the title of your page. The title is what shows in the top of your
browser window when the page is loaded. Right now it should say something like “Basis-HTML
Tutorial” on top of the window containing this text.
Another thing you will often see in the head section is meta tags. Meta tags are used for among other
things, to improve the rankings in search engines.
HTML LIST’S
HTML lists contain one or more list elements lists may contain list. List are when you want to display
data in the form of points. To create a list in HTML you use <LI> tag. This is an empty tag. HTML
support several types of lists are the following
1. Unordered list
2. Ordered list
UNORDERED LIST
An Unordered list is a list of items where the sequence of the list is not significant by default it is
marked with bullets. To create unordered list. You use <UL> tag. To create each point of the unordered
list you use <LI> tag.
<UL> tag specifies the type of bullet to be displayed in a list. It can be either a circle, a disc or a square
in shape. The default shape of the bullet that appears is a disc.
<html>
<title>UNORDERED LIST</title>
<BODY>
<H2>COMPUTER PARTS</h2>
<UL>
<LI>CPU
<BODY>
<H2>COMPUTER PARTS</h2>
<ol>
<LI>CPU
<LI>MONITOR
<LI>MOUSE
<LI>KEYBOARD
</ol>
<H2>COMPUTER PARTS</h2>
<ol type="a">
<LI>CPU
<LI>MONITOR
<LI>MOUSE
<LI>KEYBOARD
</oL>
<H2>COMPUTER PARTS</h2>
<ol type="I">
<LI>CPU
<LI>MONITOR
<LI>MOUSE
<LI>KEYBOARD
</oL >
<H2>COMPUTER PARTS</h2>
<ol type="A">
<LI>CPU
<LI>MONITOR
<LI>MOUSE
<LI>KEYBOARD
</oL>
6|Page prepared byOdelu RJRM
DEGRE COLLEGE
</BODY>
</HTML>
HTML TABLES
HTML tables used to display data in a tabular format. In the table data is represented in the form of
rows and columns.
To create tables in HTML, you use following tags
1. To create the structure of table
<TABLE>……….</TABLE>
2. To create the table row
<TR>……….</TR>
3. To create table header
<TH>…………</TH>
4. To create the table data
<TD>………..</TD>
1. TABLE TAG <TABLE>
Table tag is used to define a table in an HTML document. It is a container element and contains the
following attributes.
7|Page prepared byOdelu RJRM
DEGRE COLLEGE
Align: It gives the alignment of table to surrounding text. It can be left, right and center
Bgcolor: It is an pixels and sets the width of the border around the table. If you do not specify a
border attribute the table will be displayed without any border. Border=0 means no border.
Height: It specifies the height of a table by using either a percentage or a pixel.
Width: It specifies the width of a table by using either a percentage or a pixel.
2. TABLE ROW TAG <TR>
<TR> tag stands for table row. It is used to add rows to the table. The number of <TR> tags in a table
specifies the number of rows in the table.
<table>
<tr>…..</tr>
<tr>…..</tr>
</table>
3. TABLE HEADING TAG <TH>
Every table should have a table heading. If helps to recognize the type of data contained in the table.
<TH> tag is used to define a table header. i.e the first row will become the heading row for each column
created. It is a container element. By default the text in this row is bold and center aligned.
FORMATTING TAGS
Formatting tags are used to formatting effects on the text tin a web page are called formatting Tags.
Some of these tags are explained here.
1. BOLD TAG <B>
Bold tag helps to display the text in bold. It is a container element where the text written between the
<B> and </B> tags appear darker than the rest of the text. This tag is generally used to give headings or
to highlight important terms
<b> this is bold tab</b>
2. ITALICS TAG <I>
10 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
X <SUP>2</SUP + Y <SUP>2</SUP> <br>
H <SUB> 2 </SUB> O
</body>
</html>
11 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
***HTML FORM****
HTML forms are used to select different kinds of user input.
FORM: A FORM is an area that can contain form elements. Form elements are elements that allow the
user to enter information (like text fields, text area fields, dropdown menus, radio buttons, check boxes,
etc….) in a form
A form defined with the <Form> tag
<form>
<input>
<input>
</form>
INPUT: The most used form tag is the <input. Tag. The type of input is specified with the type
attribute. The most commonly used input type are explained below.
TEXT FIELDS: Text fields are used when you want the user to type letters, numbers etc…
<form>
First Name:
<input type=”text” name=”first name”>
<br>
Last Name:
<input type=”text” name=”Last name”>
</form>
RADIO BUTTONS
It is used to when you want the user to select one of a limited number of choices.
<form>
<input type=”radio” name=”Gender” value=”Male”>Male
<br>
<input type=”radio” name=”Gender” value=”Female”> Female
</form>
CHECK BOXES
12 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
Check boxes are used when you want the user to select one or more options of a limited number of
choices.
<form>
<input type=”checkbox” name=”vehicle” value=”Bike”/>
I Have a Bike
<input type=”checkbox” name=”vehicle” value=”car”/>
I have a car
<input type=”checkbox” name=”vehicle” value=”Laptop”/>
I have a Laptop
</form>
13 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
<INPUT TYPE="TEXT" NAME="FATHER NAME:">
<br><br>
<INPUT TYPE="CHECKBOX" NAME="GENDER" VALUE="MALE">I HAVE A BIKE
<BR>
<INPUT TYPE="CHECKBOX" NAME="GENDER" VALUE="FEMALE">
I HAVE A CAR
<BR>
<INPUT TYPE="CHECKBOX" NAME="GENDER" VALUE="FEMALE">
I HAVE A COMPUTER
<BR>
<INPUT TYPE="CHECKBOX" NAME="GENDER" VALUE="FEMALE">
I HAVE A LAPTOP
<BR>
<br>
GENDER
<BR>
<INPUT TYPE="RADIO" NAME="GENDER" VALUE="MALE">MALE
<BR>
<INPUT TYPE="RADIO" NAME="GENDER" VALUE="FEMALE">FEMALE
</FORM>
</BODY>
</HTML>
14 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
TO BE CONTINUED….
****WRITE A PROGRAM ON HTML FORM ACTIONS
<html>
<title>HTML CHECK BOXES</title>
15 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
This is done by selecting the submit button on the page. This communicates to the browser that the user
has completed data entry.
The browser sends that the data and URL of the CGI script to the server.
HTML FRMES
With frames you can display more than one HTML documents in the same browser window. Each
HTML documents is called a frame and each frame in independent of the other.
HTML FRAMESET ELEMENTS:
The frameset elements hold one or more frame elements. Each frame element can hold a separate
document.
The frame set elements states how many columns or rows there will be in the frame set and how much
percentage or pixels of space will occupy.
HTML FRAME ELEMENT:
The <frame> tag defines one particular window with in a frame set. In the example below we have a set
with tow columns.
The first column is set to 25% of the width of the browser window. The second column is set to 75% of
the width of the browser window. The document “frameA.html” is put into the first column and the
document “frameB.html” is put into the second column.
<frameset cols “25%,75%”>
<frame src=”frameA.html”/>
<frame src=”frameB.html”/>
</frameset>
WRITE A PROGRAM ON HTML FRAMES
<html>
<title>freames</title>
16 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
<FRAMESET COLS="25%,75%">
<FRAME SRC="FORMA.HTML"/>
<FRAME SRC="FORMB.HTML"/>
</FRAMESET>
</HTML>
18 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
<img src=”myphoto.gif”>
<img src=”rose flower.gif”>
<IMG WIDTH= VALUE HEIGHT=VALUE>
Ex: <IMG SRC=”MY PHOTO.JPEG” WIDTH=”25%” HEIGHT=”40%”>
Align this attribute is used to determine the vertical alignment of text and adjustment of the image.
1. ALIGN=left floats the image to the left margin
2. ALIGH= right aligns the image to the right margin
3. ALIGN= to align the image to the top margin
4. ALIGN=text top aligns the image to the top of the tallest in the line. ALT this attribute used to
give alternate text that will be displayed in place of the image.
19 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE
HOW TO INSTALL WEB PAGE
To install a web page on WWW, use Internet Services Provides (ISP) like AOL CompuServe etc. Make
sure your provider has the services you need. Space is relatively cheep to find, running from two or
more megabytes for free at Gecocities to ten megabytes or more through search engines by the phrase
free web pages and be prepared many matches. The installation totally depends upon ISP. The main
thing look for is band width, the faster the connection the better, all other things being equal.
URL:
URL stands for Unified Resourse Locator. URL locates the document to be retrived when a user clicks
on a hpter text link. URL is similar to a file name except that, in this case, the file can be on the same
machine or on a different machine in the network. There are some conventing to be retrived. A URL
need not always point to document but can also point toa query, image or result of a command. If the
reference address of the document of the document used on the internet.
The format of URL is
“Scheme: // hot. Domain / path / data name”
The URL used on www to retrieve HTML documents called HTTP URL.
WEB MANAGEMENT TOOLS
There are many different web management tools to choose from some of the best are
1. Net Objects forms http://www.netobjects.com
It controls all aspects of site with a central repository of design and features other centralized
management tools.
2. Hot Dog Pro http://www.sausage.com
Makes it fairly easy to keep track of projects by filename and does link checking
3. Adobe Page main and Site Mill http://www.adobe.com
A marvelous package fully available for the Macintosh and partially for windows 95 etc…
4. Microsoft front page 98 http://www.microsoft.com/bulider
Use of specific Microsoft specific tags and features.
20 | P a g e p r e p a r e d b y O d e l u RJRM
DEGRE COLLEGE