HTML_Final_show
HTML_Final_show
Introduction to HTML
HTML Stands for Hyper Text Markup Language.
Paired tags
Singular tags
Paired Tags
A tag is said to be a paired tag if it , along with a
companion tag.
<BODY>
Hi!! This is my first web page.
</BODY>
</HTML>
Tag Attributes
Some HTML tags require additional information
supplied to them . For instance, when a picture is placed
on the screen , information like the height and width
of the picture can be specified.
Output
Name of cities :
4 Delhi
5 Agra
6 Bangalore
Unordered Lists
An unordered List starts with the tag <UL> and end
with </UL>.
Each list items start with the tag <LI>. The attributes of
<LI> are –
Attributes Description
TYPE Specifies the type of the bullet.
Examples-
TYPE = FILLROUND
TYPE = SQUARE
Example of Unordered List
<UL>
<LI>Monday
<LI>Tuesday
<LI>Wednesday
<LI>Thursday
<LI>Friday
</UL>
Output
• Monday
• Tuesday
• Wednesday
• Thursday
• Friday
Definition Lists
Definition list start with the tag <DL> and end
with the tag </DL>.
Definition List has two sub tags.
Definition term <DT>
Definition Description <DD>
Example of Definition List
<DL>
<DT> Keyboard
<DD> An Input Device
<DT> Printer
<DD> An Output Device
</DL>
Output
Keyboard
An Input Device
Printer
An Output Device
Font
All text specified within the tags <FONT> and </FONT>
will appear in the font, size and color as specified as
attributes of the tag <FONT>. The attributes are :
Attributes Description
FACE Sets the font to the specified font name.
Output
The URL of the graphic is just like the URLs used in the
HSPACE Indicates the amount of space to the left & right of the image.
VSPACE Indicates the amount of space to the top and bottom of the
image.
ALT Indicates the text to be displaced in case the browser is unable
to display the image specified in the SRC attribute.
Examples of <IMG SRC> Tag
<IMG SRC = “images/wallpaper.gif” ALIGN = right>
Attributes Description
ALIGN Horizontal alignment is controlled by the ALIGN attribute. It
can be LEFT,CENTER or RIGHT.
VALIGN Controls the vertical alignment of cell contents. It accepts the
values TOP, MIDDLE or BOTTOM.
WIDTH Sets the WIDTH to a specific number of pixels or to a
percentage of the variable screen width . The data cell is
adjusted based on the cell data value.
BORDER Controls the border to be placed around the table. The border
thickness is specified in pixels.
CELLPADDING This attribute controls the distance between the data in a cell and
the boundaries of the cell.
CELLSPACING Controls the spacing between adjacent cells.
Table Tag
The attributes of <TD> tag are :
Attributes Description
COLSPAN The COLSPAN attribute inside a <TH> or <TD>
tag instructs the browser to make the cell defined
by the tag to take up more than one column. The
attribute can be set by giving a numeric value .
Exam. COLSPAN = 2
Attribute Description
ALIGN It controls placing of the caption with respect to
the table.
ALIGN = BOTTOM
ALIGN = TOP
Caption Tag
Header Rows ( A row that spans across columns of a
table.A table header row is defined using <TH></TH>
tags.The content of a table header row is automatically
centered and appears in boldface.
Data rows ( Individual data cells placed in the horizontal
plane creates a data row )
There could be a single data cell or multiple data
cells.
Data cells hold data that must be displayed in
the table.
A data row is defined using <TR></TR> tags.
<marquee> Tag
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>This is basic example of marquee</marquee>
<marquee direction = "up">The direction of text will be from
bottom to top.</marquee> </body>
</html>
Specific Attributes
Attribute Value Description
scroll
behavior slide Defines the type of scrolling.
alternate
rgb(x,x,x)
Deprecated − Defines the direction of
bgcolor #xxxxxx
scrolling the content.
colorname
up
down Defines the direction of scrolling the
direction
left content.
right
1. email
2. url
3. tel
4. number
5. range
6. date
7. color
HTML5 form attributes
1. placeholder
2. Required
3. Autofocus
4. Pattern
Product Number:
<input pattern="[0-9][A-Z]{3}" name="product" type="text"/>
5. list and the datalist element
<label>Your favorite fruit:
<datalist id="fruits">
<option value="Blackberry">Blackberry</option>
<option value="Blackcurrant">Blackcurrant</option>
<option value="Blueberry">Blueberry</option>
<!-- … -->
</datalist>
If other, please specify:
<input type="text" name="fruit" list="fruits">
</label>
HTML Frames
HTML frames are used to divide your browser window
into multiple sections where each section can load a
separate HTML document. A collection of frames in the
browser window is known as a frameset. The window is
divided into frames in a similar way the tables are
organized: into rows and columns.
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Frames</title>
</head>
<frameset rows = "10%,80%,10%">
<frame name = "top" src = "/html/top_frame.htm" />
<frame name = "main" src = "/html/main_frame.htm" />
<frame name = "bottom" src =
"/html/bottom_frame.htm" />
<noframes>
<body>Your browser does not support frames.</body>
</noframes>
</frameset>
</html>
Frameset Attributes
cols This attribute specifies the number and size of
horizontal spaces in a frameset.
rows This attribute specifies the number and size of vertical
spaces in a frameset.
Frame Attributes
src This attribute is specify document which will be
displayed by frame.
name This attribute is used to labeling frames. Without
labeling all links will open in the frame that they are in.
noresize This attribute avoid resizing of frames by users.
scrolling This attribute defines existence of scrollbar. If this
attribute is not used, browser put a scrollbar when
necessary. There are two choices; "yes" for showing a
scrollbar even when it is not necessary and "no" for do not
showing a scrollbar even when it is necessary.
Embedding Video
<video src = "foo.mp4" width = "300" height = "200" controls>
Your browser does not support the <video> element.
</video>
Embedding Audio
<audio src = "foo.wav" controls>
Your browser does not support the <audio> element.
</audio>
Multimedia
Multimedia refers to content that uses more than one medium.
The categories of media are slippery, but they generally include:
Text
Sound
Graphics/images
Animation/video (live footage as opposed to animation)
Multimedia became an important concept as the Web moved
away from a largely textual layout to a graphical one. Many sites
were competing to become true multimedia sites with a mixture
of text, sound, images and videos.
Multimedia
Multimedia refers to content that uses more than one medium.
The categories of media are slippery, but they generally include:
Text
Sound
Graphics/images
Animation/video (live footage as opposed to animation)
Multimedia became an important concept as the Web moved
away from a largely textual layout to a graphical one. Many sites
were competing to become true multimedia sites with a mixture
of text, sound, images and videos.
VRML
Virtual Reality Modeling Language (VRML) is an open-standard
programming language created to design three-dimensional (3-
D) and Web-based models, textures and illusion.