Web Graphics: Designing The Body Section

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

WEB GRAPHICS

DESIGNING THE
BODY SECTION
HORIZONTAL RULE
1

PARAGRAPH
LINK COLORS

 In the web page hot text will appear in a


different color. The links can be
 visited link (vlink),

 active link(alink) and

 link.

Example:

 <body bgcolor = “red” alink = “blue” vlink =


2
“green” link = “yellow”>
COMMENTS

 The comment will not appear in the web page.

 The comment can be given using < ! ....> tag

 Example : < ! This is a sample web page>

3
DESIGNING THE BODY SECTION

HEADING PRINTING
 The heading can be printed using any one of
the following six tags, <h1>, <h2>, <h3>,
<h4>, <h5>, <h6>.

 The <h1> denotes the largest size heading.

 The <h2> tag print the heading smaller and


<h3> tags makes a still smaller heading.

4
ALIGNING THE HEADING:
 The heading can be aligned
 left
 right
 center and
 justified.
 The default alignment is left.
 The following HTML documents shows the
working of Heading Tags.

5
Example 1:
H1toH6.html
<html>
<head> <title> Heading Printing </title> </head>
<body bgcolor = "yellow">
<h1> WELCOME TO HTML (H1) </h1>
<h2>Kongu Arts and Science College (H2)<h2>
<h3>Erode (H3)</h3>
<h4>Dept. of Computer Applications (H4) </h4>
<h5>II B.C.A A (H5)</h5>
<h6>WEB GRAPHICS (H6)</h6>
</body>
</html 6

H1toH6.html
Example 2:
H1toH6 align.html
<html>
<head> <title> Heading Printing with Alignment</title>
</head>
<body bgcolor = "yellow">
This a sample HTML code to print the Headings with
various alignments.
<h1 align = "center"> WELCOME TO HTML </h1>
<h2 align = "left">Kongu Arts and Science College<h2>
<h2 align = "right">Erode </h3>
<h3 align = "justified">Dept. of Computer Applications,
II B.C.A A, WEB GRAPHICS </h4>
</body> </html> 7
 H1toH6 ALIGN.HTML
HORIZONTAL RULE
 A horizontal line can be drawn using <hr> tag.

There are 4 attributes, all of which are optional.


 Size (integer value . 1- thin line and
5 – thicker line)
 Width
 Alignment
 Source
Example :

8
<html>
<head> <title> HR Printing with Alignment</title> </head>
<body>
This a sample HTML code to print the Headings with various
alignments.
<hr>
<h1 align = "center"> WELCOME TO HTML </h1>
<hr size = "3" width = "75%">
<h2 align = "left"> Kongu Arts and Science College</h2>
<hr size = "2" width = "25% ">
<h2 align = "right">Erode </h3>
<hr size = "4" width = "50%”>
<h3 align = "justified">Dept. of Computer Applications, II B.C.A
A, WEB GRAPHICS </h4>
<hr align = “center” size = "5" width = "70%" src= “Des.bmp”>
</body> </html> 9

 HR-ALIGN.html
PARAGRAPH

 The beginning and end of the paragraph can be


marked by <p> and </p>.

 It is possible to align a paragraph


 left,
 right,
 center or
 justified.

 The following HTML document shows the working


of Paragraph Tag.
 paratag.html
10
Binding Spaces:
 The HTML automatically adjusts the
intermediate spaces and aligns the text for the
required format.

 For that alignment HTML adds some spaces


itself. Such spaces are called soft spaces.

 The spaces inserted by the user are called


hard spaces.

 In some cases the text may be printed without a


breaking.
11
 Binding Spaces cont…:

 A common character entity used in HTML is


the non-breaking space : &nbsp;

 Creates white space between words or web


page elements.

 Stops the browser from breaking a line in the


wrong place.

12
 Example for Creates white space between words :
<p>
An HTML element is defined by &nbsp; &nbsp;
&nbsp; &nbsp; a starting tag. If the element
contains other content, it ends with a closing tag,
where the element name is preceded by a forward
slash.
</p>
 Example for Stops the browser from breaking a line
in the wrong place :
<p> So here paragraph is an HTML element. The H1
is another HTML element. T here are some HTML
elements which don't need to be closed, such as img,
HR and BR elements. These are known as void &nbsp;13
elements. </p>

You might also like