Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

CSS advance theory and practice program

Rating
-
Sold
-
Pages
6
Uploaded on
06-12-2025
Written in
2024/2025

In that pdf we provide css notes and program that written by teachers

Institution
Course

Content preview

Unit IV:- Cascading Style Sheets

Introduction to CSS and Its Syntax

What is CSS?
CSS (Cascading Style Sheets) is a styling language used to enhance the appearance and
layout of an HTML webpage.
It helps in designing colors, fonts, spacing, layouts, and animations for web pages.

Why Use CSS?
Makes web design attractive – Controls colors, fonts, margins, padding, etc.
Separates HTML and styling – Keeps the code clean and organized.
One CSS file can control multiple HTML pages – Saves time and effort.
Enables responsive design – Makes websites mobile-friendly.

CSS Syntax
A CSS rule consists of three main parts:
1 Selector – Specifies which HTML element to style.
2 Property – Defines what aspect to style (e.g., color, font).
3 Value – Specifies the styling details (e.g., red, 16px).
CSS Syntax Example
selector {
property: value;
}

Example: Changing the Background Color:-
<html>
<head>
<style>
body {
background-color: lightblue;
}
</style>
</head>
<body>
Hi hello
</body>
</html>
Explanation:
 body → Selector (Targets the <body> tag)
 background-color → Property (Defines the background color)
 lightblue → Value (Sets the color to light blue)

, Types of CSS

There are three main ways to apply CSS to an HTML page:

1 External CSS (Best Practice)
CSS is written in a separate .css file and linked to an HTML page using the <link> tag. This
approach keeps the code clean and reusable across multiple pages.
HTML File (index.html)
html
<!DOCTYPE html>
<html >
<head>
<title>External CSS</title>
<link rel="stylesheet" href="styles.css"> <!-- Linking the CSS file -->
</head>
<body>
<h1>Learn CSS!</h1>
<p>This example uses an external CSS file.</p>
</body>
</html>
📄 CSS File (styles.css)

body {
background-color: lightgray;
}
h1 {
color: blue;
text-align: center;
}

2 Internal CSS

CSS is written inside the <style> tag within the HTML document.
It applies only to a single HTML page.

📄 Example:

<html>
<head>
<title>Internal CSS</title>
<style>
body {
background-color: yellow;
}
h1 {
color: red;

Written for

Institution
Course

Document information

Uploaded on
December 6, 2025
Number of pages
6
Written in
2024/2025
Type
Class notes
Professor(s)
Shraddha jadhav
Contains
All classes

Subjects

$9.39
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
pranavkamble1

Also available in package deal

Get to know the seller

Seller avatar
pranavkamble1 Rajarshi shahu collage Latur
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
5 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions