HTML
HTML
12
Dept of C.S.E.,Narayana Engineering College., Nellore.
Online Shopping
IMGAGE TAG :
A picture or an image in the web page can be inserted
using the <img> tag. The <img> tag has several
attributes to inform the source, height of the picture,
width of the picture alignment, etc. The following are
the important attributes:
Src
Height
Width
Align
Alt
The src attribute specifies the source of the picture. It
gives the file name of the picture file. The height and
the Width may be expressed in terms of pixels,
percentages or en units. The default is pixels.
For Example. Consider the following.
<Image src=”flower.gif” height=150 width=250 >
We can also specify the align attributes.
TABLES:
13
Dept of C.S.E.,Narayana Engineering College., Nellore.
Online Shopping
Computer Science 1 2 3 4 5
This is coded as
<tr><td>Computer Science<td>1<td>2<td>3<td>4<td>5
FRAMES:
It is possible to divide the container into several frames, and
use each frame for displaying a different HTML document. Frames
have the following characteristics.
• Each frame is given a name
• Each frame will be targeted by an HTML document.
14
Dept of C.S.E.,Narayana Engineering College., Nellore.
Online Shopping
PIXEL UNIT:
The pixel unit represents the number of pixels in each frame.
Comas must separate the numbers. For Example, consider the
following:
<Frameset cols=”150,70,70”>
……………………..
…………………….
</frameset>
PERCENTAGE UNIT:
The percentage unit divides the window according to the
specified percentages. For example, consider the frameset definition:
15
Dept of C.S.E.,Narayana Engineering College., Nellore.
Online Shopping
Frame 1 70%
Frame 2 30%
second one has 30 per cent of the container.
FRAME DEFINITION:
The definition of the frame is given using the <frame> tag. The
<frame> tag may have the attributes:
Source HTML address (SRC)
Name of the frame (NAME)
Margin width (MARGINWIDTH)
Scrolling button (SCRPLLING)
FORMS:
The form appears when we click the hot text. A form is defined
with the <form> and </form> tags. The form tag has three attributes.
They are
action
method
16
Dept of C.S.E.,Narayana Engineering College., Nellore.
Online Shopping
enctype
ACTION ATTRIBUTE:
The action attribute informs the browser the location of the server
to which the form input has to be submitted.
METHOD ATTRIBUTE:
The method has only two choices of values. They are
Method = ”get”
Method =”post”
With the post method, the information from the user is
put into the data stream of the HTTP, and the back-end program can
read the data as input through the “standard input” data stream.
In the case of method = ”get”, the data received in the
form are placed at the end of the URL.
HIDDEN FIELDS:
In the <input> tag, we can specify type= “hidden “ to hide the text
typed by the user.
SUBMIT AND RESET BUTTONS:
The submit button is used at the end of the user input .After the user
has typed all the entries in the form, he can click the submit button
only when the user clicks the submit button Is the data given by the
user sent to the server. The submit button is created in the HTML code
as follows:
<input type = “submit” value= “submit”>
The Reset button is used to reset the values of all the values in
the form of the user . After typing some entries in the form, if the user
17
Dept of C.S.E.,Narayana Engineering College., Nellore.
Online Shopping
18
Dept of C.S.E.,Narayana Engineering College., Nellore.