SlideShare a Scribd company logo
1 of 20
Web Authoring

     Topic 14 –
Cascading Style Sheets
Objectives
Students should able to:
1   Explain Cascading Style Sheets.
2   Identify the basic syntax and use
    Cascading Style Sheets.
     ATTRIBUTE NAME and VALUE pair(s)
          <STYLE> Tag
     <LINK> Tag
          <LINK REL >
3   Use Cascading Style Sheets to
    create two or more HTML pages
Cascading Style Sheet
Gives complete control over the layout of
the Web page and the appearance of its
content.

You only need to specify presentational
preferences once, and the style can be
applied to an entire site.
Advantages of CSS
The presentation of an entire website can be
updated at a moment’s notice - standardising
the look and feel of a website.
Users of a website can compose style sheets
of their own.
Browsers are beginning to support multiple
style sheets.
Advantages of CSS
Style sheets allow content to be optimized for
more than one type of device.
Style sheets download much more quickly
because web documents using CSS take up
less hard disk space and consume less
bandwidth.
CSS Rules
A style sheet can be broken down into
progressively smaller bits. From large to
small, it goes like this:
       • Style sheet
       • Rule
       • Selector
       • Declaration
       • Property
       • Value
CSS Rules
Rule:-begins with a selector, followed by a
left curly brace, “{“ and ends with a right
curly brace “}”.
       body {
             margin: 0;
             padding: 0;
             background: #000
       url(‘images/backgrounds/earth.jpg) no-
       repeat fixed;
             font: 12 px sans-serif;
       }
CSS Rules
Selectors:- is the HTML element or elements to
which a CSS rule is applied (what to format).
       body {
             margin: 0;
             padding: 0;
             background: #000
       url(‘images/backgrounds/earth.jpg) no-
       repeat fixed;
             font: 12 px sans-serif;
       }
CSS Rules
Declarations:- is the combination of a CSS
property and value.
       body {
             margin: 0;
             padding: 0;
             background: #000
       url(‘images/backgrounds/earth.jpg) no-
       repeat fixed;
             font: 12 px sans-serif;
       }
CSS Rules
Declarations:- is the combination of a CSS
property and value.

The property appears before the colon,
and the colon is used to separate the
property from the value.
CSS Rules
Values:- keyword value is used to invoke a
predefined function.
      body {
             margin: 0;
             padding: 0;
             background: #000
      url(‘images/backgrounds/earth.jpg) no-
      repeat fixed;
             font: 12 px sans-serif;
      }
CSS Rules
Values:- keyword value is used to invoke a
predefined function.           Cont’d
      a{
           text-decoration: none;
           color: lightblue;
      }
CSS Rules
Values:- keyword value is used to invoke a
predefined function.           Cont’d
 The keywords are no-repeat, fixed and light
 blue.
 No-repeat and fixed provide the browser
 with instructions for how to render the
 background image.
 Light blue is a keyword that tells the
 browser what color the text of hyperlinks
 should be.
Basic Syntax of CSS
A CSS rule consists of two main parts:
selecter ('H1') and declaration ('color:
blue').
Cascading Style Sheet
Two ways to specify cascading style rules.

1. Within the HTML document –
             use <STYLE> tag

2. Via an external style sheet document -
             use <LINK> tag
Using <style> Tag
The <STYLE> tag is always inside the
header of the document, i.e. between the
<HEAD> Start and End Tags.

<HEAD>
    <TITLE>Bach's home page</TITLE>
    <STYLE type="text/css">
         H1 { color: blue }
    </STYLE>
</HEAD>
Using <link> Tag
The <LINK> tag is used to access an
External Style Sheet that is contained in
another document. The Attributes REL
and TYPE are required.

<LINK> tag should be placed in the
HEAD section of the document. <STYLE>
tag is not required in external style sheet.
Using <link> Tag
<HTML>
<HEAD>
    <TITLE>Bach's home page</TITLE>
    <LINK rel="stylesheet" href="styles.css"
                 type="text/css">
</HEAD>
<BODY>
    <H1>Bach's home page</H1>
    <P>Johann Sebastian Bach was a prolific
composer.
</BODY>
</HTML>
    In styles.css document
           H1 { color: blue }
Using <link> Tag
    <LINK rel="stylesheet" href="styles.css"
              type="text/css">


Specifies the relationship between the
current document and the linked
document
Referenced to the external file called
styles.css
CSS File
An example of a CSS file – mystyle.css
body
{
       background:brown
}
h1
{
       color:blue;
       font-size:x-large
}

More Related Content

What's hot

CSS LAY OUT
CSS LAY OUTCSS LAY OUT
CSS LAY OUTkylleses
 
CSS introduction
CSS introductionCSS introduction
CSS introductionCloudTech 
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpcasestudyhelp
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introductionapnwebdev
 
Web topic 16 css workflow
Web topic 16  css workflowWeb topic 16  css workflow
Web topic 16 css workflowCK Yang
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSAmit Tyagi
 
Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1Jesus Obenita Jr.
 
Session 2 intro to Css
Session 2 intro to CssSession 2 intro to Css
Session 2 intro to CssMuhammad Hesham
 
CSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorCSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorKelly Kellum
 
Website design 2
Website design 2Website design 2
Website design 2Mike Oakshott
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Chris Poteet
 

What's hot (17)

CSS LAY OUT
CSS LAY OUTCSS LAY OUT
CSS LAY OUT
 
CSS introduction
CSS introductionCSS introduction
CSS introduction
 
PHP - Introduction to PHP CSS
PHP -  Introduction to PHP CSSPHP -  Introduction to PHP CSS
PHP - Introduction to PHP CSS
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Session v(css)
Session v(css)Session v(css)
Session v(css)
 
Web topic 16 css workflow
Web topic 16  css workflowWeb topic 16  css workflow
Web topic 16 css workflow
 
Css inclusion
Css   inclusionCss   inclusion
Css inclusion
 
CSS
CSSCSS
CSS
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1
 
Session 2 intro to Css
Session 2 intro to CssSession 2 intro to Css
Session 2 intro to Css
 
Themes
ThemesThemes
Themes
 
CSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorCSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and Color
 
Website design 2
Website design 2Website design 2
Website design 2
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
css
csscss
css
 

Viewers also liked

Web topic 25 mobile optimized website
Web topic 25  mobile optimized websiteWeb topic 25  mobile optimized website
Web topic 25 mobile optimized websiteCK Yang
 
Web topic 24 usage of web browser
Web topic 24  usage of web browserWeb topic 24  usage of web browser
Web topic 24 usage of web browserCK Yang
 
Web topic 32 validate web contents
Web topic 32  validate web contentsWeb topic 32  validate web contents
Web topic 32 validate web contentsCK Yang
 
Web topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelinesWeb topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelinesCK Yang
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validationCK Yang
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validationCK Yang
 
Web topic 23 web accessibility
Web topic 23  web accessibilityWeb topic 23  web accessibility
Web topic 23 web accessibilityCK Yang
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layoutCK Yang
 
Web topic 30 ensure web contents meet
Web topic 30   ensure web contents meetWeb topic 30   ensure web contents meet
Web topic 30 ensure web contents meetCK Yang
 
Web topic 26 browser compatibilty and security
Web topic 26  browser compatibilty and securityWeb topic 26  browser compatibilty and security
Web topic 26 browser compatibilty and securityCK Yang
 
Web topic 33 publish websites
Web topic 33  publish websitesWeb topic 33  publish websites
Web topic 33 publish websitesCK Yang
 
Web topic 31 setup remote site
Web topic 31  setup remote siteWeb topic 31  setup remote site
Web topic 31 setup remote siteCK Yang
 
Web topic 27 class test
Web topic 27  class testWeb topic 27  class test
Web topic 27 class testCK Yang
 
Web topic 15 2 basic css layout
Web topic 15 2  basic css layoutWeb topic 15 2  basic css layout
Web topic 15 2 basic css layoutCK Yang
 
Web topic 20 1 html forms
Web topic 20 1  html formsWeb topic 20 1  html forms
Web topic 20 1 html formsCK Yang
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web formsCK Yang
 
Web topic 21 pass info via javascript
Web topic 21  pass info via javascriptWeb topic 21  pass info via javascript
Web topic 21 pass info via javascriptCK Yang
 
Web topic 17 font family in css
Web topic 17  font family in cssWeb topic 17  font family in css
Web topic 17 font family in cssCK Yang
 
Web topic 18 conflict resolution in css
Web topic 18  conflict resolution in cssWeb topic 18  conflict resolution in css
Web topic 18 conflict resolution in cssCK Yang
 
Web topic 5 text formatting
Web topic 5  text formattingWeb topic 5  text formatting
Web topic 5 text formattingCK Yang
 

Viewers also liked (20)

Web topic 25 mobile optimized website
Web topic 25  mobile optimized websiteWeb topic 25  mobile optimized website
Web topic 25 mobile optimized website
 
Web topic 24 usage of web browser
Web topic 24  usage of web browserWeb topic 24  usage of web browser
Web topic 24 usage of web browser
 
Web topic 32 validate web contents
Web topic 32  validate web contentsWeb topic 32  validate web contents
Web topic 32 validate web contents
 
Web topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelinesWeb topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelines
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validation
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validation
 
Web topic 23 web accessibility
Web topic 23  web accessibilityWeb topic 23  web accessibility
Web topic 23 web accessibility
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 
Web topic 30 ensure web contents meet
Web topic 30   ensure web contents meetWeb topic 30   ensure web contents meet
Web topic 30 ensure web contents meet
 
Web topic 26 browser compatibilty and security
Web topic 26  browser compatibilty and securityWeb topic 26  browser compatibilty and security
Web topic 26 browser compatibilty and security
 
Web topic 33 publish websites
Web topic 33  publish websitesWeb topic 33  publish websites
Web topic 33 publish websites
 
Web topic 31 setup remote site
Web topic 31  setup remote siteWeb topic 31  setup remote site
Web topic 31 setup remote site
 
Web topic 27 class test
Web topic 27  class testWeb topic 27  class test
Web topic 27 class test
 
Web topic 15 2 basic css layout
Web topic 15 2  basic css layoutWeb topic 15 2  basic css layout
Web topic 15 2 basic css layout
 
Web topic 20 1 html forms
Web topic 20 1  html formsWeb topic 20 1  html forms
Web topic 20 1 html forms
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web forms
 
Web topic 21 pass info via javascript
Web topic 21  pass info via javascriptWeb topic 21  pass info via javascript
Web topic 21 pass info via javascript
 
Web topic 17 font family in css
Web topic 17  font family in cssWeb topic 17  font family in css
Web topic 17 font family in css
 
Web topic 18 conflict resolution in css
Web topic 18  conflict resolution in cssWeb topic 18  conflict resolution in css
Web topic 18 conflict resolution in css
 
Web topic 5 text formatting
Web topic 5  text formattingWeb topic 5  text formatting
Web topic 5 text formatting
 

Similar to Web topic 14 cascading style sheets

waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptIsmaciil2
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Erin M. Kidwell
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptxVarunMM2
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptxVarunMM2
 
Css introduction
Css  introductionCss  introduction
Css introductionvishnu murthy
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.netProgrammer Blog
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
 
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1Shawn Calvert
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptkassahungebrie
 

Similar to Web topic 14 cascading style sheets (20)

html-css
html-csshtml-css
html-css
 
Css
CssCss
Css
 
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
 
css1.ppt
css1.pptcss1.ppt
css1.ppt
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Css basic
Css basicCss basic
Css basic
 
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1
 
WT CSS
WT  CSSWT  CSS
WT CSS
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
Css ppt
Css pptCss ppt
Css ppt
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).ppt
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 

More from CK Yang

Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html formsCK Yang
 
Web topic 13 html validation tools
Web topic 13  html validation toolsWeb topic 13  html validation tools
Web topic 13 html validation toolsCK Yang
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in htmlCK Yang
 
Web topic 11 importance of html validation
Web topic 11  importance of html validationWeb topic 11  importance of html validation
Web topic 11 importance of html validationCK Yang
 
Web topic 10 2 web design basics
Web topic 10 2  web design basicsWeb topic 10 2  web design basics
Web topic 10 2 web design basicsCK Yang
 
Web topic 9 navigation and link
Web topic 9  navigation and linkWeb topic 9  navigation and link
Web topic 9 navigation and linkCK Yang
 
Web topic 8 listings in html
Web topic 8  listings in htmlWeb topic 8  listings in html
Web topic 8 listings in htmlCK Yang
 
Web topic 7 html tags for links
Web topic 7  html tags for linksWeb topic 7  html tags for links
Web topic 7 html tags for linksCK Yang
 
Web topic 4 style in html
Web topic 4  style in htmlWeb topic 4  style in html
Web topic 4 style in htmlCK Yang
 

More from CK Yang (9)

Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html forms
 
Web topic 13 html validation tools
Web topic 13  html validation toolsWeb topic 13  html validation tools
Web topic 13 html validation tools
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in html
 
Web topic 11 importance of html validation
Web topic 11  importance of html validationWeb topic 11  importance of html validation
Web topic 11 importance of html validation
 
Web topic 10 2 web design basics
Web topic 10 2  web design basicsWeb topic 10 2  web design basics
Web topic 10 2 web design basics
 
Web topic 9 navigation and link
Web topic 9  navigation and linkWeb topic 9  navigation and link
Web topic 9 navigation and link
 
Web topic 8 listings in html
Web topic 8  listings in htmlWeb topic 8  listings in html
Web topic 8 listings in html
 
Web topic 7 html tags for links
Web topic 7  html tags for linksWeb topic 7  html tags for links
Web topic 7 html tags for links
 
Web topic 4 style in html
Web topic 4  style in htmlWeb topic 4  style in html
Web topic 4 style in html
 

Recently uploaded

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, ...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
"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 ...Zilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
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.pptxRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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 REVIEWERMadyBayot
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Christopher Logan Kennedy
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
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...Orbitshub
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vĂĄzquez
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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.pdfOrbitshub
 
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 WorkerThousandEyes
 
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...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 

Recently uploaded (20)

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, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
"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 ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
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
 
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
 

Web topic 14 cascading style sheets

  • 1. Web Authoring Topic 14 – Cascading Style Sheets
  • 2. Objectives Students should able to: 1 Explain Cascading Style Sheets. 2 Identify the basic syntax and use Cascading Style Sheets. ATTRIBUTE NAME and VALUE pair(s) <STYLE> Tag <LINK> Tag <LINK REL > 3 Use Cascading Style Sheets to create two or more HTML pages
  • 3. Cascading Style Sheet Gives complete control over the layout of the Web page and the appearance of its content. You only need to specify presentational preferences once, and the style can be applied to an entire site.
  • 4. Advantages of CSS The presentation of an entire website can be updated at a moment’s notice - standardising the look and feel of a website. Users of a website can compose style sheets of their own. Browsers are beginning to support multiple style sheets.
  • 5. Advantages of CSS Style sheets allow content to be optimized for more than one type of device. Style sheets download much more quickly because web documents using CSS take up less hard disk space and consume less bandwidth.
  • 6. CSS Rules A style sheet can be broken down into progressively smaller bits. From large to small, it goes like this: • Style sheet • Rule • Selector • Declaration • Property • Value
  • 7. CSS Rules Rule:-begins with a selector, followed by a left curly brace, “{“ and ends with a right curly brace “}”. body { margin: 0; padding: 0; background: #000 url(‘images/backgrounds/earth.jpg) no- repeat fixed; font: 12 px sans-serif; }
  • 8. CSS Rules Selectors:- is the HTML element or elements to which a CSS rule is applied (what to format). body { margin: 0; padding: 0; background: #000 url(‘images/backgrounds/earth.jpg) no- repeat fixed; font: 12 px sans-serif; }
  • 9. CSS Rules Declarations:- is the combination of a CSS property and value. body { margin: 0; padding: 0; background: #000 url(‘images/backgrounds/earth.jpg) no- repeat fixed; font: 12 px sans-serif; }
  • 10. CSS Rules Declarations:- is the combination of a CSS property and value. The property appears before the colon, and the colon is used to separate the property from the value.
  • 11. CSS Rules Values:- keyword value is used to invoke a predefined function. body { margin: 0; padding: 0; background: #000 url(‘images/backgrounds/earth.jpg) no- repeat fixed; font: 12 px sans-serif; }
  • 12. CSS Rules Values:- keyword value is used to invoke a predefined function. Cont’d a{ text-decoration: none; color: lightblue; }
  • 13. CSS Rules Values:- keyword value is used to invoke a predefined function. Cont’d The keywords are no-repeat, fixed and light blue. No-repeat and fixed provide the browser with instructions for how to render the background image. Light blue is a keyword that tells the browser what color the text of hyperlinks should be.
  • 14. Basic Syntax of CSS A CSS rule consists of two main parts: selecter ('H1') and declaration ('color: blue').
  • 15. Cascading Style Sheet Two ways to specify cascading style rules. 1. Within the HTML document – use <STYLE> tag 2. Via an external style sheet document - use <LINK> tag
  • 16. Using <style> Tag The <STYLE> tag is always inside the header of the document, i.e. between the <HEAD> Start and End Tags. <HEAD> <TITLE>Bach's home page</TITLE> <STYLE type="text/css"> H1 { color: blue } </STYLE> </HEAD>
  • 17. Using <link> Tag The <LINK> tag is used to access an External Style Sheet that is contained in another document. The Attributes REL and TYPE are required. <LINK> tag should be placed in the HEAD section of the document. <STYLE> tag is not required in external style sheet.
  • 18. Using <link> Tag <HTML> <HEAD> <TITLE>Bach's home page</TITLE> <LINK rel="stylesheet" href="styles.css" type="text/css"> </HEAD> <BODY> <H1>Bach's home page</H1> <P>Johann Sebastian Bach was a prolific composer. </BODY> </HTML> In styles.css document H1 { color: blue }
  • 19. Using <link> Tag <LINK rel="stylesheet" href="styles.css" type="text/css"> Specifies the relationship between the current document and the linked document Referenced to the external file called styles.css
  • 20. CSS File An example of a CSS file – mystyle.css body { background:brown } h1 { color:blue; font-size:x-large }