Practical 1: Develop and Demonstrate The Usage of Inline, Internal and External Style Sheet Using CSS. Solution

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Advance Web Programming (3161611) Enrollment No.

: _________________
_________________________________________________________________________________________________

Practical 1: Develop and demonstrate the usage of inline, internal and external style sheet using CSS.

Solution:

(1) Inline CSS

File : InlineCss.html

<html>
<head>
<title> Inline CSS </title>
</head>
<body>
<h1 style="color:red; font-family:Arial;">
Inline CSS-1
</h1>
<h1 style="color:blue; font-family:Time New Roman;">
Inline CSS-2
</h1>
<h2 style="color:green; font-family:Verdana;">
Inline CSS-3
</h2>
</body>
</html>

Output :

___________________________________________________________________________________________________
1
Semester : 6 Batch : B1
Advance Web Programming (3161611) Enrollment No. : _________________
_________________________________________________________________________________________________
(2) Internal CSS

File : InternalCss.html

<html>
<head>
<title> Internal CSS </title>
<style type="text/css">
h1{color:red; font-family:Arial;}
h2{color:blue; font-family:Arial;}
</style>
</head>
<body>
<h1> Internal CSS </h1>
<h2> Internal CSS </h2>
<h1> Internal CSS </h1>
<h1> Internal CSS </h1>
<h2> Internal CSS </h2>
<h2 style="color:green; font-family:Arial;"> Internal CSS </h2>
</body>
</html>

Output :

___________________________________________________________________________________________________
2
Semester : 6 Batch : B1
Advance Web Programming (3161611) Enrollment No. : _________________
_________________________________________________________________________________________________

(3) External CSS


File : ExternalCss.html

<html>
<head>
<link rel="stylesheet" type="text/css" href="style-1.css" />
<link rel="stylesheet" type="text/css" href="style-2.css" />
</head>
<body>
<h1> External CSS-1</h1>
<h2> External CSS-2</h2>
</body>
</html>

style-1.css
h1{color:red; font-family:Arial;}}

style-2.css
h2{color:blue; font-family:verdana;}

Output:

___________________________________________________________________________________________________
3
Semester : 6 Batch : B1
Advance Web Programming (3161611) Enrollment No. : _________________
_________________________________________________________________________________________________

___________________________________________________________________________________________________
4
Semester : 6 Batch : B1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy