SlideShare a Scribd company logo
1 of 15
OUTLINES
• What is CSS?
• Syntax
• Comments
• Example
• Types of CSS
• External style sheet
• Internal style sheet
• Inline style sheet
WHAT IS CSS?
• CSS stands for Cascading Style Sheets
• Markup language used in the web document for
presentation purpose.
• Various elements like text, font and color are used in
CSS for presentation.
• Can be used to bring styles in the web documents.
• By combining with HTML document, flexibility of
content is achieved.
SYNTAX
• A CSS rule has two main parts: a Selector and one or
more Declarations:
• The selector is the HTML element you want to style.
• Each declaration consists of a property and a value.
• The property is the style for the attribute you want to
change.
• Each property has a value.
COMMENTS
• A CSS comment begins with "/*", and ends with
"*/", like this:
• /*This is a comment*/
• Eg: p
{
text-align: center;
/*This text is center align*/
color: black;
font-family: arial;
}
EXAMPLE
• CSS declarations always end with a semicolon, and
declaration groups are surrounded by curly brackets:
p {color: red; text-align: center;}
• To make the CSS more readable, you can put one
declaration on each line, like this:
p
{
color: red;
text-align: center;
}
<html>
<head>
<style type=“text/css”>
p
{
color: red;
text-align: center;
}
</style>
</head>
<body>
<p>Hello World!</p>
<p>This paragraph is styled with CSS</p>
</body>
</html>
TYPES OF CSS
• There are 3 types of cascading style sheet:
1) External style sheet.
2) Internal style sheet.
3) Inline style.
EXTERNAL STYLE SHEET
• Ideal when applied to Many Pages.
<head>
<link rel=“stylesheet” type=“text/css” href="mystyle.css"/>
</head>
• An external style sheet can be written in any text editor.
• Your style sheet should be saved with a .css extension.
• Eg:
hr {color: sienna;}
p {margin-left:20px;}
body {background-image: url("images/back40.gif");}
INTERNAL STYLE SHEET
• It should be used when a Single Document has a unique
style.
• You can define internal styles in the head section of an
HTML page, by using the <style> tag, like this:
• Eg:
<head>
<style type="text/css">
hr {color: sienna;}
p {margin-left:20px;}
body {background-image: url("images/back40.gif");}
</style>
</head>
INLINE STYLE SHEET
• An inline style loses many of the advantages of a
style sheet.
• To use inline styles, add the style attribute to the
relevant tag.
• The style attribute can contain any CSS property.
• E.g.
<h1 style="color:blue;margin-left:30px;">This is a
heading.</h1>
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)

More Related Content

What's hot

Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
vikasgaur31
 
introduction to web technology
introduction to web technologyintroduction to web technology
introduction to web technology
vikram singh
 

What's hot (20)

Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Html coding
Html codingHtml coding
Html coding
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
HTML
HTMLHTML
HTML
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Learn html Basics
Learn html BasicsLearn html Basics
Learn html Basics
 
Css selectors
Css selectorsCss selectors
Css selectors
 
Html TAGS
Html TAGSHtml TAGS
Html TAGS
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTML
 
Tags in html
Tags in htmlTags in html
Tags in html
 
introduction to web technology
introduction to web technologyintroduction to web technology
introduction to web technology
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
 
Html images syntax
Html images syntaxHtml images syntax
Html images syntax
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 
Html
HtmlHtml
Html
 
Html notes
Html notesHtml notes
Html notes
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 

Viewers also liked

CSS-Cascading Style Sheets - Introduction
CSS-Cascading Style Sheets - IntroductionCSS-Cascading Style Sheets - Introduction
CSS-Cascading Style Sheets - Introduction
Mukesh Tekwani
 
Common gateway interface
Common gateway interfaceCommon gateway interface
Common gateway interface
Anandita
 

Viewers also liked (20)

Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
Css
CssCss
Css
 
Cgi
CgiCgi
Cgi
 
Week 12 CSS - Review from last week
Week 12 CSS - Review from last weekWeek 12 CSS - Review from last week
Week 12 CSS - Review from last week
 
Css ppt
Css pptCss ppt
Css ppt
 
Efficient, maintainable CSS
Efficient, maintainable CSSEfficient, maintainable CSS
Efficient, maintainable CSS
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
CSS-Cascading Style Sheets - Introduction
CSS-Cascading Style Sheets - IntroductionCSS-Cascading Style Sheets - Introduction
CSS-Cascading Style Sheets - Introduction
 
Web Engineering - Basic CSS Properties
Web Engineering - Basic CSS PropertiesWeb Engineering - Basic CSS Properties
Web Engineering - Basic CSS Properties
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Common gateway interface
Common gateway interfaceCommon gateway interface
Common gateway interface
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
CGI Presentation
CGI PresentationCGI Presentation
CGI Presentation
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 

Similar to Cascading Style Sheet (CSS)

Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
alvindalejoyosa1
 

Similar to Cascading Style Sheet (CSS) (20)

Css
CssCss
Css
 
Week11 Lecture: CSS
Week11 Lecture: CSSWeek11 Lecture: CSS
Week11 Lecture: CSS
 
CSS
CSSCSS
CSS
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Css present
Css presentCss present
Css present
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
 
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
 
Css
CssCss
Css
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
Css Basics
Css BasicsCss Basics
Css Basics
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Css
CssCss
Css
 
html-css
html-csshtml-css
html-css
 

More from AakankshaR

More from AakankshaR (10)

Tem
TemTem
Tem
 
Nanoelectronics
NanoelectronicsNanoelectronics
Nanoelectronics
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
 
Global System for Mobile (GSM)
Global System for Mobile (GSM)Global System for Mobile (GSM)
Global System for Mobile (GSM)
 
Probability Density Function (PDF)
Probability Density Function (PDF)Probability Density Function (PDF)
Probability Density Function (PDF)
 
Applications of Z transform
Applications of Z transformApplications of Z transform
Applications of Z transform
 
Time multiplexed time switch
Time multiplexed time switchTime multiplexed time switch
Time multiplexed time switch
 
PHOTODETECTORS
PHOTODETECTORSPHOTODETECTORS
PHOTODETECTORS
 
TWO STAGE NETWORKS
TWO STAGE NETWORKSTWO STAGE NETWORKS
TWO STAGE NETWORKS
 
BCH Codes
BCH CodesBCH Codes
BCH Codes
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Cascading Style Sheet (CSS)

  • 1.
  • 2. OUTLINES • What is CSS? • Syntax • Comments • Example • Types of CSS • External style sheet • Internal style sheet • Inline style sheet
  • 3. WHAT IS CSS? • CSS stands for Cascading Style Sheets • Markup language used in the web document for presentation purpose. • Various elements like text, font and color are used in CSS for presentation. • Can be used to bring styles in the web documents. • By combining with HTML document, flexibility of content is achieved.
  • 4. SYNTAX • A CSS rule has two main parts: a Selector and one or more Declarations: • The selector is the HTML element you want to style. • Each declaration consists of a property and a value. • The property is the style for the attribute you want to change. • Each property has a value.
  • 5. COMMENTS • A CSS comment begins with "/*", and ends with "*/", like this: • /*This is a comment*/ • Eg: p { text-align: center; /*This text is center align*/ color: black; font-family: arial; }
  • 6. EXAMPLE • CSS declarations always end with a semicolon, and declaration groups are surrounded by curly brackets: p {color: red; text-align: center;} • To make the CSS more readable, you can put one declaration on each line, like this: p { color: red; text-align: center; }
  • 7. <html> <head> <style type=“text/css”> p { color: red; text-align: center; } </style> </head> <body> <p>Hello World!</p> <p>This paragraph is styled with CSS</p> </body> </html>
  • 8. TYPES OF CSS • There are 3 types of cascading style sheet: 1) External style sheet. 2) Internal style sheet. 3) Inline style.
  • 9. EXTERNAL STYLE SHEET • Ideal when applied to Many Pages. <head> <link rel=“stylesheet” type=“text/css” href="mystyle.css"/> </head> • An external style sheet can be written in any text editor. • Your style sheet should be saved with a .css extension. • Eg: hr {color: sienna;} p {margin-left:20px;} body {background-image: url("images/back40.gif");}
  • 10.
  • 11. INTERNAL STYLE SHEET • It should be used when a Single Document has a unique style. • You can define internal styles in the head section of an HTML page, by using the <style> tag, like this: • Eg: <head> <style type="text/css"> hr {color: sienna;} p {margin-left:20px;} body {background-image: url("images/back40.gif");} </style> </head>
  • 12.
  • 13. INLINE STYLE SHEET • An inline style loses many of the advantages of a style sheet. • To use inline styles, add the style attribute to the relevant tag. • The style attribute can contain any CSS property. • E.g. <h1 style="color:blue;margin-left:30px;">This is a heading.</h1>