Professional Documents
Culture Documents
Web Designing
Semester - III
• Introduction to Frames
• Building Frames
• Frame Elements
• Introduction to Cascading Style Sheets
• Overview of Style Sheet
• Different ways to use style sheet
• Adding style to a document
Try2.html
Left.html Right.html
• tag{attribute:value;attribute:value….}
….
</style>
Where “style type=“text/css” indicates
that the style sheet conforms to css
syntax
Font-family A comma-delimited
sequence of font family
names (sans-serif)
Font-style Normal , italic
Font-size A term that denotes
absolute size(xx-small,x-
small,small,medium,large
),a number( of pixels)
Copyright @ Amity University
Use of Font Attribute
<HTML>
<HEAD><TITLE>WORKING WITH STYLE SHEETS USING FONT
ATTRIBUTES</TITLE>
<STYLE Type=“text/css”>
H1{font-family:arial}
P{font-size:12pt;font-style:italic}
</STYLE></HEAD>
<BODY>
<H1>Silicon chip technologies</H1>
<P>Silicon chip technologies,a private limited company, was founded in
December 1989.
<P>The vision of this company is to provide any corporate client a single
entity which addresses all their software development, technical and
user documentation, training and manpower recruitment needs.
</BODY>
</HTML>
Attributes Values
color Sets an element‟s text-color.A
color name or code
background-color Specifies the color in an
element‟s background.
Background-image Sets the background image.A
URL or none.
Background-repeat With a background image
specified, sets up how the
image repeats throughout the
page.repeat-x(repeats
horizontally), repeat-
y(repeats vertically)
,repeat(both), no repeat
Copyright @ Amity University
Use of Color and Background Attributes
<HTML>
<HEAD><TITLE>WORKING WITH STYLE SHEETS USING COLOR AND BACKGROUND
ATTRIBUTES</TITLE>
<STYLE Type=“text/css”>
H1{font-family:arial;font-size:26pt; background-image:url(images/pic.gif)}
H2{font-family:arial;font-size:26pt;background-image:url(pic1.gif);background-repeat:no-
repeat}
P{font-size:12pt;font-style:italic;background-color:red}
</STYLE></HEAD>
<BODY>
<B><U> With background repeat</U></B>
<H1>Silicon chip technologies</H1>
<P>A private limited company,was founded in december 1989.The vision of this company is to
provide any corporate client a single entity which addresses all their software
development,technical and user documentation, training and manpower recruitment needs.
</P><BR />
<B><U>With background no-repeat</U></B>
<H2>Silicon Chip Technologies</H2>
</BODY>
</HTML>
A private limited company, was founded in December 1989.The vision of this company is to
provide any corporate client a single entity which addresses all their software development, technical and user
documentation, training and manpower recruitment needs.
<HTML>
<HEAD><TITLE>WORKING WITH STYLE SHEETS USING MARGIN
ATTRIBUTES</TITLE>
<STYLE Type=“text/css”>
BODY{margin-top:10%}
H1{font-family:arial;font-size:26pt;color:red}
P{font-size:12pt;font-style:italic;margin-left:15%;margin-right:15%}
</STYLE></HEAD>
<BODY>
<H1>Silicon chip technologies</H1>
<P>A private limited company,was founded in december 1989.The vision of this
company is to provide any corporate client a single entity which addresses all their
software development,technical and user documentation,training and manpower
recruitment needs.
</P>
</BODY>
</HTML>
The vision of this company is to provide any corporate client a single entity which addresses all their
software development,technical and user documentation,training and manpower recruitment needs
Attributes Values
List-style Circle,square,decimal,
lower-roman, upper-
roman.
i. HTML
ii. JAVASCRIPT
iii. CGI
iv. JAVA
v. POWERBUILDER
vi. ORACLE DEVELOPER 2000
vii. ORACLE DBA
• /* This is a comment */
p
{
text-align: center;
/* This is another comment */
color: black;
font-family: arial
}
• <head>
<style type="text/css">
<!--
hr {color: red}
p {margin-left: 20px}
body {background-image:
url("images/background1.gif")}
-->
</style>
</head>
Copyright @ Amity University
Types of Style Sheets
• <html>
• <head>
• <link rel="stylesheet" type="text/css"
href="style1.css" />
• </head>
• <body>
• <p> The text in this paragraph will be blue. </p>
</body>
• </html>
Copyright @ Amity University
The code in style1.css file
• p {color:blue}
• Syntax
• p#red-center
{
text-align: center;
color: red
}
• .large {
color: green;
font-family:arial;
font-size: 4pt;
}
• <div class="large">
This is a DIV sample.
</div>
output
• This is a DIV sample.
• largefont {
color: blue;
font-family:arial;
font-size: 6px;
}
• Output