SlideShare a Scribd company logo
1 of 41
Css Founder.com | Cssfounder Company
http://cssfounder.com
Web Development & Design
Foundations with XHTML
Chapter 3
Key Concepts
Cssfounder.com
3
Learning
Outcomes
 In this chapter, you will learn to:
 Describe the evolution of style sheets
from print media to the Web
 List advantages of using Cascading Style Sheets
 Use color on Web pages
 Create style sheets that configure common color and text
properties
 Apply inline styles
 Use embedded style sheets
 Use external style sheets
 Create CSS class and id selectors
 Validate CSS
Cssfounder.com
4
Overview of
Cascading Style Sheets (CSS)
 See what is possible with CSS:
 Visit http://www.zengarden.com
 Style Sheets
 used for years in Desktop Publishing
 apply typographical styles and spacing to printed media
 CSS
 provides the functionality of style sheets (and much
more) for web developers
 a flexible, cross-platform, standards-based language
developed by the W3C.
Cssfounder.com
5
CSS
Advantages
 Greater typography and page layout control
 Style is separate from structure
 Styles can be stored in a separate document and
linked to from the web page
 Potentially smaller documents
 Easier site maintenance
Cssfounder.com
6
Types of
Cascading Style Sheets (1)
 Inline Styles
 Embedded Styles
 External Styles
 Imported Styles
Cssfounder.com
7
Types of
Cascading Style Sheets (2)
 Inline Styles
 Configured in the body of the Web page
 Use the style attribute of an XHTML tag
 Apply only to the specific element
 Embedded Styles
 Configured in the header section of a Web page.
 Use the XHTML <style> element
 Apply to the entire Web page document
 External Styles
 Configured in a separate text file with .css file extension
 The XHTML <link /> element in the header section of a
Web page associates it with the .css file
 Imported Styles
 Similar to External Styles
 We’ll concentrate on the other three types of styles.
Cssfounder.com
8
CSS
Syntax
 Style sheets are composed of "Rules" that
describe the styling to be applied.
 Each Rule contains a Selector and a Declaration
Cssfounder.com
9
CSS
Syntax Sample
Configure a Web page to display blue text and
yellow background.
body { color: blue;
background-color: yellow; }
This could also be written using hexadecimal
color values as shown below.
body { color: #0000FF;
background-color: #FFFF00; }
Cssfounder.com
10
Common Formatting
CSS Properties
 See Table 3.1 Common CSS Properties, including:
 background-color
 color
 font-family
 font-size
 font-style
 font-weight
 line-height
 margin
 text-align
 text-decoration
 width
Cssfounder.com
11
Using Color on
Web Pages
 Computer monitors display color as
intensities of red, green, and blue light
 RGB Color
 The values of red, green, and blue vary
from 0 to 255.
 Hexadecimal numbers (base 16) represent
these color values.
Cssfounder.com
12
Hexadecimal
Color Values
 # is used to indicate a hexadecimal value
 Hex value pairs range from 00 to FF
 Three hex value pairs describe an RGB
color
#000000 black #FFFFFF white
#FF0000 red #00FF00 green
#0000FF blue
Cssfounder.com
13
Web Color
Palette
 A collection of 216 colors
 Display the most similar
on the Mac and PC
platforms
 Hex values:
00, 33, 66, 99, CC, FF
 Color Chart
http://webdevfoundations.net/color
Cssfounder.com
Making Color Choices
 How to choose a color scheme?
 Monochromatic
 http://meyerweb.com/eric/tools/color-blend
 Choose from a photograph or other image
 http://www.colr.org
 Begin with a favorite color
 Use one of the sites below to choose other colors
 http://colorsontheweb.com/colorwizard.asp
 http://kuler.Adobe.com
 http://www.steeldolphin.com/color_scheme.html
 http://wellstyled.com/tools/colorscheme2/index-en.html
 http://www.colors4webmasters.com/safecolor/index.htm
Cssfounder.com
Accessibility & Color
 Everyone is not able to see or distinguish between
colors
 Information must be conveyed even if color cannot
be viewed
 According to Vischeck http://www.vischeck.com/vischeck
 1 out of 20 people experience some type of color deficiency
 Color choice can be crucial
 Avoid using red, green, brown, gray, or purple next to each
other
 White, black, and shades of blue and yellow are
easier to differentiate.
 Simulation: http://www.vischeck.com/vischeck/vischeckURL.php
Cssfounder.com
16
Configuring Color with
Inline CSS (1)
 Inline CSS
 Configured in the body of the Web page
 Use the style attribute of an XHTML tag
 Apply only to the specific element
 The Style Attribute
 Value: one or more style declaration property and value
pairs
Example: configure red color text in an <h1> element:
<h1 style="color:#ff0000">Heading text is red</h1>
Cssfounder.com
17
Configuring Color with
Inline CSS (2)
Example 2: configure the red text in the heading
configure a gray backgroundin the heading
Separate style rule declarations with ;
<h1 style="color:#FF0000;background-color:#cccccc">This is
displayed as a red heading with gray background</h1>
Cssfounder.com
18
CSS Embedded Styles
 Configured in the header section of a Web page.
 Use the XHTML <style> element
 Apply to the entire Web page document
 Style declarations are contained between the
opening and closing <style> tags
 The type attribute indicates the MIME type of
text/css
 Example: Configure a Web page with white text
on a black background
<style type ="text/css">
body { background-color: #000000;
color: #FFFFFF;
}
</style>Cssfounder.com
CSS Embedded Styles
<style type="text/css">
body { background-color: #E6E6FA;
color: #191970;}
h1 { background-color: #191970;
color: #E6E6FA;}
h2 { background-color: #AEAED4;
color: #191970;}
</style>
• The body selector sets the
global style rules for the entire
page.
• These global rules are
overridden for <h1> and <h2>
elements by the h1 and h2
style rules.
Cssfounder.com
Checkpoint 3.1
1. List three reasons to use CSS on a Web page.
2. When designing a page that uses colors other
than the default colors for text and background,
explain why it is a good reason to configure style
rules for both text color and background color.
3. Describe one advantage to using embedded styles
instead of inline styles.
Cssfounder.com
Configuring Text with CSS
 CSS properties for configuring text:
 font-weight
 Configures the boldness of text
 font-style
 Configures text to an italic style
 font-size
 Configures the size of the text
 font-family
 Configures the font typeface of the text
Cssfounder.com
The font-size Property
 Accessibility Recommendation:
 Use em or percentage font sizes – these can be easily
enlarged in all browsers by usersCssfounder.com
The font-family Property
 Not everyone has the same fonts installed in their
computer
 Configure a list of fonts and include a generic family
name
p {font-family: Arial,Verdana, sans-serif;}
Cssfounder.com
Embedded Styles
Example
<style type="text/css">
body { background-color: #E6E6FA;
color: #191970;
font-family: Arial, Verdana, sans-serif; }
h1 { background-color: #191970;
color: #E6E6FA;
line-height: 200%;
font-family: Georgia, "Times New Roman", serif; }
h2 { background-color: #AEAED4;
color: #191970;
font-family: Georgia, "Times New Roman", serif; }
p {font-size: .90em; }
ul {font-weight: bold; }
</style>
Cssfounder.com
CSS Selectors
CSS style rules can be configured for an:
 HTML element selector
 class selector
 id selector
Cssfounder.com
26
Using CSS
with “class”
 class Selector
 Use to apply a CSS
rule to a certain
"class" of elements
on a Web page
 Does not associate the
style to a particular
XHTML element
 Configure with .classname
 The sample creates a class called “new” with red
italic text.
 To use the class, code the following XHTML:
<p class=“new”>This is text is red and in italics</p>
<style type="text/css">
.new { color: #FF0000;
font-style: italic;
}
</style>
Cssfounder.com
27
Using CSS
with “id”
 id Selector
 Use to apply a CSS
rule to ONE element
on a Web page.
 Configure with #idname
 The sample creates an id called “new” with red,
large, italic text.
 To use the id, code the following XHTML:
<p id=“new”>This is text is red, large, and in italics</p>
<style type="text/css">
#new { color: #FF0000;
font-size:2em;
font-style: italic;
}
</style>
Cssfounder.com
28
XHTML
<div> element
 A block-level element
 Purpose: configure a specially formatted division or
area of a Web page
 There is a line break before and after the division.
 Can contain other block-level and inline elements
 Useful to define an area that will contain other block-
level tags (such as paragraphs or spans) within it.
Cssfounder.com
29
XHTML
<div> Element Example
 Configure a page footer area
 Embedded CSS:
<style type="text/css">
.footer { font-size: small;
text-align: center; }
</style>
 XHTML:
<div class=“footer">Copyright &copy; 2009</div>
Cssfounder.com
30
XHTML
<span> element
 An inline-level element
 Purpose:
 configure a specially formatted area displayed
in-line with other elements, such as within a
paragraph.
 There is no line break before and after the
span.
Cssfounder.com
31
XHTML
<span> Element Example
 Embedded CSS:
<style type="text/css">
.companyname { font-weight: bold;
font-family: Georgia, "Times New Roman", serif;
font-size: 1.25em;
}
</style>
 XHTML:
<p>Your needs are important to us at <span
class=“companyname">Acme Web Design</span>.
We will work with you to build your Web site.</p>
Cssfounder.com
32
External
Style Sheets - 1
 CSS style rules are contained in a
text file separate from the XHTML
documents.
 The External Style Sheet text file:
 extension ".css"
 contains only style rules
 does not contain any XHTML tags
Cssfounder.com
body {background-color:#E6E6FA;
color:#000000;
font-family:Arial, sans-serif;
font-size:90%; }
h2 { color: #003366; }
.nav { font-size: 16px;
font-weight: bold; }
body {background-color:#E6E6FA;
color:#000000;
font-family:Arial, sans-serif;
font-size:90%; }
h2 { color: #003366; }
.nav { font-size: 16px;
font-weight: bold; }
33
External
Style Sheets - 2
 Multiple web pages can associate with
the same external style sheet file.
site.css
index.htmindex.htm
clients.htmclients.htm
about.htmabout.htm
Etc…
Cssfounder.com
34
The <link /> Element
 A self-contained tag
 Placed in the header section
 Purpose: associates the external
style sheet file with the web page.
 Example:
<link rel="stylesheet" href="color.css" type="text/css" />
Cssfounder.com
Using an
External Style Sheet
To link to the external style sheet called color.css, the
XHTML code placed in the header section is:
<link rel="stylesheet" href="color.css" type="text/css" />
body { background-color: #0000FF;
color: #FFFFFF;
}
External Style Sheet color.css
Cssfounder.com
36
Checkpoint 3.2
1. Describe a reason to use embedded styles.
Explain where embedded styles are placed on a
web page.
2. Describe a reason to use external styles. Explain
where external styles are placed and how web
pages indicate they are using external styles.
3. Write the code to configure a web page to use
an external style sheet called “mystyles.css”.
Cssfounder.com
Centering Page Content
with CSS#container { margin-left: auto;
margin-right: auto;
width:80%; }
Cssfounder.com
W3C CSS Validation
 http://jigsaw.w3.org/css-validator/
Cssfounder.com
CSS Guidelines –
Getting Started
 Review the design of the page
 Configure global font and color properties for the body selector
 Identify typical elements (such as <h1>, <h3>, and so on) and
declare style rules for these if needed.
 Identify page areas such as logo, navigation, footer, and so on
– configure an appropriate class or id for each.
 Create one prototype page that contains most of the
elements you plan to use and test.
 Revise your CSS as needed.
 Once your design is set – move styles to an external .css file
 Planning and testing are important activities when
designing a Web site
Cssfounder.com
CSS Troubleshooting Tips
 Verify you are using the : and ; symbols in the right spots—
they are easy to confuse.
 Check that you are not using = signs instead of : between
each property and its value.
 Verify that the { and } symbols are properly placed
 Check the syntax of your selectors, their properties, and
property values for correct usage.
 If part of your CSS works, and part doesn’t:
 Review your CSS
 Determine the first rule that is not applied.
Often the error is in the rule above the rule that is not applied.
 Validate your CSS at http://jigsaw.w3.org/css-validator
Cssfounder.com
41
Summary
 This chapter introduced you to Cascading
Style Sheet Rules associated with color and
text on web pages.
 You configured inline styles, embedded
styles, and external styles.
 You applied CSS style rues to HTML, class,
and id selectors.
 You are able to submit your CSS to the W3C
CSS Validation test.
Cssfounder.com

More Related Content

What's hot (20)

What is CSS?
What is CSS?What is CSS?
What is CSS?
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
css.ppt
css.pptcss.ppt
css.ppt
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
 
Css
CssCss
Css
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
TM 1st quarter - 4th meeting
TM   1st quarter - 4th meetingTM   1st quarter - 4th meeting
TM 1st quarter - 4th meeting
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
David Weliver
David WeliverDavid Weliver
David Weliver
 
Css
CssCss
Css
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 
Css
CssCss
Css
 

Viewers also liked

Css Founder.com | Cssfounder se
Css Founder.com | Cssfounder seCss Founder.com | Cssfounder se
Css Founder.com | Cssfounder seCss Founder
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhiCss Founder
 
Website designing company in faridabad
Website designing company in faridabadWebsite designing company in faridabad
Website designing company in faridabadCss Founder
 
Website designing company in gurgaon
Website designing company in gurgaonWebsite designing company in gurgaon
Website designing company in gurgaonCss Founder
 
Website designing company in noida
Website designing company in noidaWebsite designing company in noida
Website designing company in noidaCss Founder
 
Website designing compay in noida
Website designing compay in noidaWebsite designing compay in noida
Website designing compay in noidaCss Founder
 
Website designing company in noida
Website designing company in noidaWebsite designing company in noida
Website designing company in noidaCss Founder
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhiCss Founder
 
Website designing company | Cssfounder.com
Website designing company | Cssfounder.comWebsite designing company | Cssfounder.com
Website designing company | Cssfounder.comCss Founder
 
Website designing company in gudgaon
Website designing company in gudgaonWebsite designing company in gudgaon
Website designing company in gudgaonCss Founder
 
Css Founder.com | Cssfounder Org
Css Founder.com | Cssfounder OrgCss Founder.com | Cssfounder Org
Css Founder.com | Cssfounder OrgCss Founder
 
Css Founder.com | Cssfounder Net
Css Founder.com | Cssfounder NetCss Founder.com | Cssfounder Net
Css Founder.com | Cssfounder NetCss Founder
 
Website designing company in delhi ncr
Website designing company in delhi ncrWebsite designing company in delhi ncr
Website designing company in delhi ncrCss Founder
 
Website designing company in mumbai
Website designing company in mumbaiWebsite designing company in mumbai
Website designing company in mumbaiCss Founder
 

Viewers also liked (14)

Css Founder.com | Cssfounder se
Css Founder.com | Cssfounder seCss Founder.com | Cssfounder se
Css Founder.com | Cssfounder se
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
 
Website designing company in faridabad
Website designing company in faridabadWebsite designing company in faridabad
Website designing company in faridabad
 
Website designing company in gurgaon
Website designing company in gurgaonWebsite designing company in gurgaon
Website designing company in gurgaon
 
Website designing company in noida
Website designing company in noidaWebsite designing company in noida
Website designing company in noida
 
Website designing compay in noida
Website designing compay in noidaWebsite designing compay in noida
Website designing compay in noida
 
Website designing company in noida
Website designing company in noidaWebsite designing company in noida
Website designing company in noida
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
 
Website designing company | Cssfounder.com
Website designing company | Cssfounder.comWebsite designing company | Cssfounder.com
Website designing company | Cssfounder.com
 
Website designing company in gudgaon
Website designing company in gudgaonWebsite designing company in gudgaon
Website designing company in gudgaon
 
Css Founder.com | Cssfounder Org
Css Founder.com | Cssfounder OrgCss Founder.com | Cssfounder Org
Css Founder.com | Cssfounder Org
 
Css Founder.com | Cssfounder Net
Css Founder.com | Cssfounder NetCss Founder.com | Cssfounder Net
Css Founder.com | Cssfounder Net
 
Website designing company in delhi ncr
Website designing company in delhi ncrWebsite designing company in delhi ncr
Website designing company in delhi ncr
 
Website designing company in mumbai
Website designing company in mumbaiWebsite designing company in mumbai
Website designing company in mumbai
 

Similar to Css Founder.com | Cssfounder Company

Chapter3
Chapter3Chapter3
Chapter3cpashke
 
Web Design Chapter3
Web Design Chapter3Web Design Chapter3
Web Design Chapter3cpashke
 
Chapter 3 - Web Design
Chapter 3 - Web DesignChapter 3 - Web Design
Chapter 3 - Web Designtclanton4
 
HTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptxHTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptxJJFajardo1
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpcasestudyhelp
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Binu Paul
 
Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Sutinder Mann
 
Using Cascading Style Sheets2
Using Cascading Style Sheets2Using Cascading Style Sheets2
Using Cascading Style Sheets2Sutinder Mann
 
Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8RohanMistry15
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdfwubiederebe1
 
Styling text using css
Styling text using cssStyling text using css
Styling text using cssDaniel Francis
 
Css training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsCss training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsQA TrainingHub
 

Similar to Css Founder.com | Cssfounder Company (20)

Chapter3
Chapter3Chapter3
Chapter3
 
Web Design Chapter3
Web Design Chapter3Web Design Chapter3
Web Design Chapter3
 
Chapter 3 - Web Design
Chapter 3 - Web DesignChapter 3 - Web Design
Chapter 3 - Web Design
 
HTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptxHTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptx
 
Chapter3
Chapter3Chapter3
Chapter3
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
CSS
CSSCSS
CSS
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
 
Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10
 
Using Cascading Style Sheets2
Using Cascading Style Sheets2Using Cascading Style Sheets2
Using Cascading Style Sheets2
 
Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8Advanced Web Programming Chapter 8
Advanced Web Programming Chapter 8
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdf
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
Styling text using css
Styling text using cssStyling text using css
Styling text using css
 
Css training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsCss training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentials
 
Css
CssCss
Css
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
 

More from Css Founder

Cssfounder.com website designing company in delhi
Cssfounder.com website designing company in delhiCssfounder.com website designing company in delhi
Cssfounder.com website designing company in delhiCss Founder
 
Internet technology and web designing
Internet technology and web designingInternet technology and web designing
Internet technology and web designingCss Founder
 
Web page design-cssfounder
Web page design-cssfounderWeb page design-cssfounder
Web page design-cssfounderCss Founder
 
Tech dev cssfounder.com
Tech dev cssfounder.comTech dev cssfounder.com
Tech dev cssfounder.comCss Founder
 
Digital india-cssfounder.com
Digital india-cssfounder.comDigital india-cssfounder.com
Digital india-cssfounder.comCss Founder
 
Poverty inindia CssFounder.com
Poverty inindia CssFounder.comPoverty inindia CssFounder.com
Poverty inindia CssFounder.comCss Founder
 
Poverty in india Cssfounder.com
Poverty in india Cssfounder.comPoverty in india Cssfounder.com
Poverty in india Cssfounder.comCss Founder
 
Website designing company in delhi e commerce
Website designing company in delhi e commerceWebsite designing company in delhi e commerce
Website designing company in delhi e commerceCss Founder
 
Website designing company_in_delhi blogging
Website designing company_in_delhi bloggingWebsite designing company_in_delhi blogging
Website designing company_in_delhi bloggingCss Founder
 
Website designing company in delhi blog powerpoint
Website designing company in delhi blog powerpointWebsite designing company in delhi blog powerpoint
Website designing company in delhi blog powerpointCss Founder
 
Website designing company_in_delhi e-business
Website designing company_in_delhi e-businessWebsite designing company_in_delhi e-business
Website designing company_in_delhi e-businessCss Founder
 
Website designing company_in_mumbai_digital india
Website designing company_in_mumbai_digital indiaWebsite designing company_in_mumbai_digital india
Website designing company_in_mumbai_digital indiaCss Founder
 
Website designing company_in_delhi_digitization practices
Website designing company_in_delhi_digitization practicesWebsite designing company_in_delhi_digitization practices
Website designing company_in_delhi_digitization practicesCss Founder
 
Website designing company_in_delhi_education
Website designing company_in_delhi_educationWebsite designing company_in_delhi_education
Website designing company_in_delhi_educationCss Founder
 
Website designing company_in_delhi_education system
Website designing company_in_delhi_education systemWebsite designing company_in_delhi_education system
Website designing company_in_delhi_education systemCss Founder
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentCss Founder
 
Website development process
Website development processWebsite development process
Website development processCss Founder
 
Webdesign website development_company_surat
Webdesign website development_company_suratWebdesign website development_company_surat
Webdesign website development_company_suratCss Founder
 
Internet website designing_company_in_delhi
Internet website designing_company_in_delhiInternet website designing_company_in_delhi
Internet website designing_company_in_delhiCss Founder
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhiCss Founder
 

More from Css Founder (20)

Cssfounder.com website designing company in delhi
Cssfounder.com website designing company in delhiCssfounder.com website designing company in delhi
Cssfounder.com website designing company in delhi
 
Internet technology and web designing
Internet technology and web designingInternet technology and web designing
Internet technology and web designing
 
Web page design-cssfounder
Web page design-cssfounderWeb page design-cssfounder
Web page design-cssfounder
 
Tech dev cssfounder.com
Tech dev cssfounder.comTech dev cssfounder.com
Tech dev cssfounder.com
 
Digital india-cssfounder.com
Digital india-cssfounder.comDigital india-cssfounder.com
Digital india-cssfounder.com
 
Poverty inindia CssFounder.com
Poverty inindia CssFounder.comPoverty inindia CssFounder.com
Poverty inindia CssFounder.com
 
Poverty in india Cssfounder.com
Poverty in india Cssfounder.comPoverty in india Cssfounder.com
Poverty in india Cssfounder.com
 
Website designing company in delhi e commerce
Website designing company in delhi e commerceWebsite designing company in delhi e commerce
Website designing company in delhi e commerce
 
Website designing company_in_delhi blogging
Website designing company_in_delhi bloggingWebsite designing company_in_delhi blogging
Website designing company_in_delhi blogging
 
Website designing company in delhi blog powerpoint
Website designing company in delhi blog powerpointWebsite designing company in delhi blog powerpoint
Website designing company in delhi blog powerpoint
 
Website designing company_in_delhi e-business
Website designing company_in_delhi e-businessWebsite designing company_in_delhi e-business
Website designing company_in_delhi e-business
 
Website designing company_in_mumbai_digital india
Website designing company_in_mumbai_digital indiaWebsite designing company_in_mumbai_digital india
Website designing company_in_mumbai_digital india
 
Website designing company_in_delhi_digitization practices
Website designing company_in_delhi_digitization practicesWebsite designing company_in_delhi_digitization practices
Website designing company_in_delhi_digitization practices
 
Website designing company_in_delhi_education
Website designing company_in_delhi_educationWebsite designing company_in_delhi_education
Website designing company_in_delhi_education
 
Website designing company_in_delhi_education system
Website designing company_in_delhi_education systemWebsite designing company_in_delhi_education system
Website designing company_in_delhi_education system
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopment
 
Website development process
Website development processWebsite development process
Website development process
 
Webdesign website development_company_surat
Webdesign website development_company_suratWebdesign website development_company_surat
Webdesign website development_company_surat
 
Internet website designing_company_in_delhi
Internet website designing_company_in_delhiInternet website designing_company_in_delhi
Internet website designing_company_in_delhi
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 

Css Founder.com | Cssfounder Company

  • 1. Css Founder.com | Cssfounder Company http://cssfounder.com
  • 2. Web Development & Design Foundations with XHTML Chapter 3 Key Concepts Cssfounder.com
  • 3. 3 Learning Outcomes  In this chapter, you will learn to:  Describe the evolution of style sheets from print media to the Web  List advantages of using Cascading Style Sheets  Use color on Web pages  Create style sheets that configure common color and text properties  Apply inline styles  Use embedded style sheets  Use external style sheets  Create CSS class and id selectors  Validate CSS Cssfounder.com
  • 4. 4 Overview of Cascading Style Sheets (CSS)  See what is possible with CSS:  Visit http://www.zengarden.com  Style Sheets  used for years in Desktop Publishing  apply typographical styles and spacing to printed media  CSS  provides the functionality of style sheets (and much more) for web developers  a flexible, cross-platform, standards-based language developed by the W3C. Cssfounder.com
  • 5. 5 CSS Advantages  Greater typography and page layout control  Style is separate from structure  Styles can be stored in a separate document and linked to from the web page  Potentially smaller documents  Easier site maintenance Cssfounder.com
  • 6. 6 Types of Cascading Style Sheets (1)  Inline Styles  Embedded Styles  External Styles  Imported Styles Cssfounder.com
  • 7. 7 Types of Cascading Style Sheets (2)  Inline Styles  Configured in the body of the Web page  Use the style attribute of an XHTML tag  Apply only to the specific element  Embedded Styles  Configured in the header section of a Web page.  Use the XHTML <style> element  Apply to the entire Web page document  External Styles  Configured in a separate text file with .css file extension  The XHTML <link /> element in the header section of a Web page associates it with the .css file  Imported Styles  Similar to External Styles  We’ll concentrate on the other three types of styles. Cssfounder.com
  • 8. 8 CSS Syntax  Style sheets are composed of "Rules" that describe the styling to be applied.  Each Rule contains a Selector and a Declaration Cssfounder.com
  • 9. 9 CSS Syntax Sample Configure a Web page to display blue text and yellow background. body { color: blue; background-color: yellow; } This could also be written using hexadecimal color values as shown below. body { color: #0000FF; background-color: #FFFF00; } Cssfounder.com
  • 10. 10 Common Formatting CSS Properties  See Table 3.1 Common CSS Properties, including:  background-color  color  font-family  font-size  font-style  font-weight  line-height  margin  text-align  text-decoration  width Cssfounder.com
  • 11. 11 Using Color on Web Pages  Computer monitors display color as intensities of red, green, and blue light  RGB Color  The values of red, green, and blue vary from 0 to 255.  Hexadecimal numbers (base 16) represent these color values. Cssfounder.com
  • 12. 12 Hexadecimal Color Values  # is used to indicate a hexadecimal value  Hex value pairs range from 00 to FF  Three hex value pairs describe an RGB color #000000 black #FFFFFF white #FF0000 red #00FF00 green #0000FF blue Cssfounder.com
  • 13. 13 Web Color Palette  A collection of 216 colors  Display the most similar on the Mac and PC platforms  Hex values: 00, 33, 66, 99, CC, FF  Color Chart http://webdevfoundations.net/color Cssfounder.com
  • 14. Making Color Choices  How to choose a color scheme?  Monochromatic  http://meyerweb.com/eric/tools/color-blend  Choose from a photograph or other image  http://www.colr.org  Begin with a favorite color  Use one of the sites below to choose other colors  http://colorsontheweb.com/colorwizard.asp  http://kuler.Adobe.com  http://www.steeldolphin.com/color_scheme.html  http://wellstyled.com/tools/colorscheme2/index-en.html  http://www.colors4webmasters.com/safecolor/index.htm Cssfounder.com
  • 15. Accessibility & Color  Everyone is not able to see or distinguish between colors  Information must be conveyed even if color cannot be viewed  According to Vischeck http://www.vischeck.com/vischeck  1 out of 20 people experience some type of color deficiency  Color choice can be crucial  Avoid using red, green, brown, gray, or purple next to each other  White, black, and shades of blue and yellow are easier to differentiate.  Simulation: http://www.vischeck.com/vischeck/vischeckURL.php Cssfounder.com
  • 16. 16 Configuring Color with Inline CSS (1)  Inline CSS  Configured in the body of the Web page  Use the style attribute of an XHTML tag  Apply only to the specific element  The Style Attribute  Value: one or more style declaration property and value pairs Example: configure red color text in an <h1> element: <h1 style="color:#ff0000">Heading text is red</h1> Cssfounder.com
  • 17. 17 Configuring Color with Inline CSS (2) Example 2: configure the red text in the heading configure a gray backgroundin the heading Separate style rule declarations with ; <h1 style="color:#FF0000;background-color:#cccccc">This is displayed as a red heading with gray background</h1> Cssfounder.com
  • 18. 18 CSS Embedded Styles  Configured in the header section of a Web page.  Use the XHTML <style> element  Apply to the entire Web page document  Style declarations are contained between the opening and closing <style> tags  The type attribute indicates the MIME type of text/css  Example: Configure a Web page with white text on a black background <style type ="text/css"> body { background-color: #000000; color: #FFFFFF; } </style>Cssfounder.com
  • 19. CSS Embedded Styles <style type="text/css"> body { background-color: #E6E6FA; color: #191970;} h1 { background-color: #191970; color: #E6E6FA;} h2 { background-color: #AEAED4; color: #191970;} </style> • The body selector sets the global style rules for the entire page. • These global rules are overridden for <h1> and <h2> elements by the h1 and h2 style rules. Cssfounder.com
  • 20. Checkpoint 3.1 1. List three reasons to use CSS on a Web page. 2. When designing a page that uses colors other than the default colors for text and background, explain why it is a good reason to configure style rules for both text color and background color. 3. Describe one advantage to using embedded styles instead of inline styles. Cssfounder.com
  • 21. Configuring Text with CSS  CSS properties for configuring text:  font-weight  Configures the boldness of text  font-style  Configures text to an italic style  font-size  Configures the size of the text  font-family  Configures the font typeface of the text Cssfounder.com
  • 22. The font-size Property  Accessibility Recommendation:  Use em or percentage font sizes – these can be easily enlarged in all browsers by usersCssfounder.com
  • 23. The font-family Property  Not everyone has the same fonts installed in their computer  Configure a list of fonts and include a generic family name p {font-family: Arial,Verdana, sans-serif;} Cssfounder.com
  • 24. Embedded Styles Example <style type="text/css"> body { background-color: #E6E6FA; color: #191970; font-family: Arial, Verdana, sans-serif; } h1 { background-color: #191970; color: #E6E6FA; line-height: 200%; font-family: Georgia, "Times New Roman", serif; } h2 { background-color: #AEAED4; color: #191970; font-family: Georgia, "Times New Roman", serif; } p {font-size: .90em; } ul {font-weight: bold; } </style> Cssfounder.com
  • 25. CSS Selectors CSS style rules can be configured for an:  HTML element selector  class selector  id selector Cssfounder.com
  • 26. 26 Using CSS with “class”  class Selector  Use to apply a CSS rule to a certain "class" of elements on a Web page  Does not associate the style to a particular XHTML element  Configure with .classname  The sample creates a class called “new” with red italic text.  To use the class, code the following XHTML: <p class=“new”>This is text is red and in italics</p> <style type="text/css"> .new { color: #FF0000; font-style: italic; } </style> Cssfounder.com
  • 27. 27 Using CSS with “id”  id Selector  Use to apply a CSS rule to ONE element on a Web page.  Configure with #idname  The sample creates an id called “new” with red, large, italic text.  To use the id, code the following XHTML: <p id=“new”>This is text is red, large, and in italics</p> <style type="text/css"> #new { color: #FF0000; font-size:2em; font-style: italic; } </style> Cssfounder.com
  • 28. 28 XHTML <div> element  A block-level element  Purpose: configure a specially formatted division or area of a Web page  There is a line break before and after the division.  Can contain other block-level and inline elements  Useful to define an area that will contain other block- level tags (such as paragraphs or spans) within it. Cssfounder.com
  • 29. 29 XHTML <div> Element Example  Configure a page footer area  Embedded CSS: <style type="text/css"> .footer { font-size: small; text-align: center; } </style>  XHTML: <div class=“footer">Copyright &copy; 2009</div> Cssfounder.com
  • 30. 30 XHTML <span> element  An inline-level element  Purpose:  configure a specially formatted area displayed in-line with other elements, such as within a paragraph.  There is no line break before and after the span. Cssfounder.com
  • 31. 31 XHTML <span> Element Example  Embedded CSS: <style type="text/css"> .companyname { font-weight: bold; font-family: Georgia, "Times New Roman", serif; font-size: 1.25em; } </style>  XHTML: <p>Your needs are important to us at <span class=“companyname">Acme Web Design</span>. We will work with you to build your Web site.</p> Cssfounder.com
  • 32. 32 External Style Sheets - 1  CSS style rules are contained in a text file separate from the XHTML documents.  The External Style Sheet text file:  extension ".css"  contains only style rules  does not contain any XHTML tags Cssfounder.com
  • 33. body {background-color:#E6E6FA; color:#000000; font-family:Arial, sans-serif; font-size:90%; } h2 { color: #003366; } .nav { font-size: 16px; font-weight: bold; } body {background-color:#E6E6FA; color:#000000; font-family:Arial, sans-serif; font-size:90%; } h2 { color: #003366; } .nav { font-size: 16px; font-weight: bold; } 33 External Style Sheets - 2  Multiple web pages can associate with the same external style sheet file. site.css index.htmindex.htm clients.htmclients.htm about.htmabout.htm Etc… Cssfounder.com
  • 34. 34 The <link /> Element  A self-contained tag  Placed in the header section  Purpose: associates the external style sheet file with the web page.  Example: <link rel="stylesheet" href="color.css" type="text/css" /> Cssfounder.com
  • 35. Using an External Style Sheet To link to the external style sheet called color.css, the XHTML code placed in the header section is: <link rel="stylesheet" href="color.css" type="text/css" /> body { background-color: #0000FF; color: #FFFFFF; } External Style Sheet color.css Cssfounder.com
  • 36. 36 Checkpoint 3.2 1. Describe a reason to use embedded styles. Explain where embedded styles are placed on a web page. 2. Describe a reason to use external styles. Explain where external styles are placed and how web pages indicate they are using external styles. 3. Write the code to configure a web page to use an external style sheet called “mystyles.css”. Cssfounder.com
  • 37. Centering Page Content with CSS#container { margin-left: auto; margin-right: auto; width:80%; } Cssfounder.com
  • 38. W3C CSS Validation  http://jigsaw.w3.org/css-validator/ Cssfounder.com
  • 39. CSS Guidelines – Getting Started  Review the design of the page  Configure global font and color properties for the body selector  Identify typical elements (such as <h1>, <h3>, and so on) and declare style rules for these if needed.  Identify page areas such as logo, navigation, footer, and so on – configure an appropriate class or id for each.  Create one prototype page that contains most of the elements you plan to use and test.  Revise your CSS as needed.  Once your design is set – move styles to an external .css file  Planning and testing are important activities when designing a Web site Cssfounder.com
  • 40. CSS Troubleshooting Tips  Verify you are using the : and ; symbols in the right spots— they are easy to confuse.  Check that you are not using = signs instead of : between each property and its value.  Verify that the { and } symbols are properly placed  Check the syntax of your selectors, their properties, and property values for correct usage.  If part of your CSS works, and part doesn’t:  Review your CSS  Determine the first rule that is not applied. Often the error is in the rule above the rule that is not applied.  Validate your CSS at http://jigsaw.w3.org/css-validator Cssfounder.com
  • 41. 41 Summary  This chapter introduced you to Cascading Style Sheet Rules associated with color and text on web pages.  You configured inline styles, embedded styles, and external styles.  You applied CSS style rues to HTML, class, and id selectors.  You are able to submit your CSS to the W3C CSS Validation test. Cssfounder.com