SlideShare a Scribd company logo
1
HOPE FOUNDATION’S
INTERNATIONAL INSTITUTE OF IFORMATION TECHNOLOGY, (I²IT)
www.isquareit.edu.in
+91 20 22933441 / 2
PREPARED BY: PROF. KIMI B. RAMTEKE
WEB TECHNOLOGY
CASCADING STYLE SHEET
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Web Technology
UNIT 1
Contents
• Introduction to CSS
• Use of CSS
• Syntax of CSS
• Types of CSS
– External CSS
– Internal CSS
– Inline CSS
• Exercise
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
CSS Introduction
• CSS stands for Cascading Style Sheets
• CSS depicts about how HTML elements are to
be displayed on screen, different media
devices
• CSS saves a lot of time for styling many pages
of a big website just at once with single
control file(.css).
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Why to Use CSS?
• CSS is helps you to give design, layout for your
web pages and variations in display for various
devices and sizes of the screen.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
CSS Syntax
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
CSS Syntax Description
• The selector helps to style the HTML element
you want.
• The declaration block can contains one or
many declarations which need to be
separated by semicolons.
• Each declaration has two parts:
– 1. property name
– 2. a value and both are separated by a colon(:).
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
How to apply CSS to HTML
3 Ways:
• External style sheet
– External style sheet helps to change style of multiple
pages of a website at once by making changes in just
one file.
• Internal style sheet
– An internal style sheet is helpful if one single page has
to give a different style.
• Inline style
– An inline style is helpful if element need to be styled
differently.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Website Level style
Page Level Style
Element level Style
External style sheet
HTML file
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS File
<style>
body {background-color:
powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
Separate
HTML
file
Separate
CSS File
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
External style sheet
Test.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
type=“text/css”
href=“Demo.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Demo.css
<style>
body {background-color:
powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
Linking
CSS with
HTML
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Internal style sheet
<html>
<head>
......This is example of Internal CSS, style is written inside head element only.........
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS
embedded
in HTML
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Inline style
<!DOCTYPE html>
<html>
<body>
<h1 style="color:Red;">This is a Blue
Heading</h1>
</body>ss
</html>
Inline
CSS
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Exercise
1. Set "background-color: linen" for the page,
using an internal style sheet.
2. Set "background-color: blue" for the page,
using an inline style sheet.
3. Set <p> with "background-color: green" and
<h1> with “color : green” using external style
sheet.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Guess the Output?
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
color: orange;
}
</style>
<link rel="stylesheet" type="text/css" href=“Demo.css">
</head>
<body>
<h1>This is a heading</h1>
<p>The style of this document is a combination of an external style sheet, and internal
style</p>
</body>
</html>
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
References
• Ivan Bayross, “Web enabled commercial
applications developments using
HTML,JavaScript, DHTML,PHP” BPB.
• https://www.w3schools.com/css/
THANK YOU
For further information please contact
Prof. Kimi Ramteke
Department of Computer Engineering
Hope Foundation’s International Institute of Information Technology, I²IT
Hinjawadi, Pune – 411 057
Phone - +91 20 22933441
www.isquareit.edu.in | kimir@isquareit.edu.in
16

More Related Content

PPTX
Introduction to Big Data, HADOOP: HDFS, MapReduce
PPTX
Difference Between AI(Artificial Intelligence), ML(Machine Learning), DL (Dee...
PPTX
Cloud Computing & Virtual Infrastructure
PPTX
Engineering Mathematics | Maxima and Minima
Introduction to Big Data, HADOOP: HDFS, MapReduce
Difference Between AI(Artificial Intelligence), ML(Machine Learning), DL (Dee...
Cloud Computing & Virtual Infrastructure
Engineering Mathematics | Maxima and Minima

What's hot (20)

PPTX
State Pattern: Introduction & Implementation
PPTX
What are the real differences between a wireframe, storyboard and a prototype?
PPTX
Adapter Pattern: Introduction & Implementation (with examples)
PPTX
Computer Network Technology | Dynamic Host Configuration Protocol
PPTX
Systems Programming & Operating Systems - Overview of LEX-and-YACC
PPTX
PPTX
Usability Heuristics - Principles & Examples
PPTX
FUSION - Pattern Recognition, Classification, Classifier Fusion
PPTX
Superstructure and it's various components
PPTX
Human Computer Interaction - INPUT OUTPUT CHANNELS
PPTX
Introduction to Wireless Sensor Networks (WSN)
PPTX
Artificial Intelligence - Introduction
PPTX
Supervised Learning in Cybersecurity
PPTX
Conformal Mapping - Introduction & Examples
State Pattern: Introduction & Implementation
What are the real differences between a wireframe, storyboard and a prototype?
Adapter Pattern: Introduction & Implementation (with examples)
Computer Network Technology | Dynamic Host Configuration Protocol
Systems Programming & Operating Systems - Overview of LEX-and-YACC
Usability Heuristics - Principles & Examples
FUSION - Pattern Recognition, Classification, Classifier Fusion
Superstructure and it's various components
Human Computer Interaction - INPUT OUTPUT CHANNELS
Introduction to Wireless Sensor Networks (WSN)
Artificial Intelligence - Introduction
Supervised Learning in Cybersecurity
Conformal Mapping - Introduction & Examples
Ad

Similar to What Is Cascading Style Sheet? (20)

PPT
Importance of Theory of Computations
PPT
devops dtail education and devops ools which r used
PPT
DevOps Industry Perspective Mr Pradip Ashok Chougule
PPTX
DAA Introduction to Algorithms & Application
PPTX
Introduction To Assembly Language Programming
PPTX
DevOps slides with standard workflow and process
PDF
DOC
Resume-2016
PDF
Resume_AniruddhNathani
DOC
My res2017
PPTX
Euler’s Theorem Homogeneous Function Of Two Variables
PPTX
PPTX
PDF
Resume generator2
DOCX
Ankit Resume
PDF
AMARNATH REDDY.B(RESUME) - IS
PPT
Java as Object Oriented Programming Language
PPTX
The Smart Bridge Interview now Veranda Learning
Importance of Theory of Computations
devops dtail education and devops ools which r used
DevOps Industry Perspective Mr Pradip Ashok Chougule
DAA Introduction to Algorithms & Application
Introduction To Assembly Language Programming
DevOps slides with standard workflow and process
Resume-2016
Resume_AniruddhNathani
My res2017
Euler’s Theorem Homogeneous Function Of Two Variables
Resume generator2
Ankit Resume
AMARNATH REDDY.B(RESUME) - IS
Java as Object Oriented Programming Language
The Smart Bridge Interview now Veranda Learning
Ad

More from International Institute of Information Technology (I²IT) (20)

PPTX
Understanding Natural Language Processing
PPTX
Professional Ethics & Etiquette: What Are They & How Do I Get Them?
PPTX
Writing Skills: Importance of Writing Skills
PPTX
Professional Communication | Introducing Oneself
PPTX
PPTX
What Is Jenkins? Features and How It Works
PPTX
Data Science, Big Data, Data Analytics
PPTX
Sentiment Analysis in Machine Learning
PPTX
Data Visualization - How to connect Microsoft Forms to Power BI
PPTX
Yoga To Fight & Win Against COVID-19
PPTX
Land Pollution - Causes, Effects & Solution
PPTX
Sampling Theorem and Band Limited Signals
PPTX
Types of Sampling in Analog Communication
Understanding Natural Language Processing
Professional Ethics & Etiquette: What Are They & How Do I Get Them?
Writing Skills: Importance of Writing Skills
Professional Communication | Introducing Oneself
What Is Jenkins? Features and How It Works
Data Science, Big Data, Data Analytics
Sentiment Analysis in Machine Learning
Data Visualization - How to connect Microsoft Forms to Power BI
Yoga To Fight & Win Against COVID-19
Land Pollution - Causes, Effects & Solution
Sampling Theorem and Band Limited Signals
Types of Sampling in Analog Communication

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Cloud computing and distributed systems.
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
20250228 LYD VKU AI Blended-Learning.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MIND Revenue Release Quarter 2 2025 Press Release
The Rise and Fall of 3GPP – Time for a Sabbatical?
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
Machine learning based COVID-19 study performance prediction
Programs and apps: productivity, graphics, security and other tools
Mobile App Security Testing_ A Comprehensive Guide.pdf

What Is Cascading Style Sheet?

  • 1. 1 HOPE FOUNDATION’S INTERNATIONAL INSTITUTE OF IFORMATION TECHNOLOGY, (I²IT) www.isquareit.edu.in +91 20 22933441 / 2 PREPARED BY: PROF. KIMI B. RAMTEKE WEB TECHNOLOGY CASCADING STYLE SHEET
  • 2. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in Web Technology UNIT 1
  • 3. Contents • Introduction to CSS • Use of CSS • Syntax of CSS • Types of CSS – External CSS – Internal CSS – Inline CSS • Exercise Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 4. CSS Introduction • CSS stands for Cascading Style Sheets • CSS depicts about how HTML elements are to be displayed on screen, different media devices • CSS saves a lot of time for styling many pages of a big website just at once with single control file(.css). Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 5. Why to Use CSS? • CSS is helps you to give design, layout for your web pages and variations in display for various devices and sizes of the screen. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 6. CSS Syntax Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 7. CSS Syntax Description • The selector helps to style the HTML element you want. • The declaration block can contains one or many declarations which need to be separated by semicolons. • Each declaration has two parts: – 1. property name – 2. a value and both are separated by a colon(:). Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 8. How to apply CSS to HTML 3 Ways: • External style sheet – External style sheet helps to change style of multiple pages of a website at once by making changes in just one file. • Internal style sheet – An internal style sheet is helpful if one single page has to give a different style. • Inline style – An inline style is helpful if element need to be styled differently. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in Website Level style Page Level Style Element level Style
  • 9. External style sheet HTML file <!DOCTYPE html> <html> <head> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> CSS File <style> body {background-color: powderblue;} h1 {color: blue;} p {color: red;} </style> Separate HTML file Separate CSS File Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 10. External style sheet Test.html <!DOCTYPE html> <html> <head> <link rel="stylesheet" type=“text/css” href=“Demo.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> Demo.css <style> body {background-color: powderblue;} h1 {color: blue;} p {color: red;} </style> Linking CSS with HTML Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 11. Internal style sheet <html> <head> ......This is example of Internal CSS, style is written inside head element only......... <style> body {background-color: powderblue;} h1 {color: blue;} p {color: red;} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> CSS embedded in HTML Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 12. Inline style <!DOCTYPE html> <html> <body> <h1 style="color:Red;">This is a Blue Heading</h1> </body>ss </html> Inline CSS Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 13. Exercise 1. Set "background-color: linen" for the page, using an internal style sheet. 2. Set "background-color: blue" for the page, using an inline style sheet. 3. Set <p> with "background-color: green" and <h1> with “color : green” using external style sheet. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 14. Guess the Output? <!DOCTYPE html> <html> <head> <style> h1 { color: orange; } </style> <link rel="stylesheet" type="text/css" href=“Demo.css"> </head> <body> <h1>This is a heading</h1> <p>The style of this document is a combination of an external style sheet, and internal style</p> </body> </html> Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
  • 15. References • Ivan Bayross, “Web enabled commercial applications developments using HTML,JavaScript, DHTML,PHP” BPB. • https://www.w3schools.com/css/
  • 16. THANK YOU For further information please contact Prof. Kimi Ramteke Department of Computer Engineering Hope Foundation’s International Institute of Information Technology, I²IT Hinjawadi, Pune – 411 057 Phone - +91 20 22933441 www.isquareit.edu.in | kimir@isquareit.edu.in 16