CSS: Crazy Striped Socks - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

CSS: Crazy Striped Socks

Description:

... and Internet Explorer - continued to add new HTML tags and attributes (like the ... consortium, responsible for standardizing HTML - created STYLES in ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 11
Provided by: jl34
Category:

less

Transcript and Presenter's Notes

Title: CSS: Crazy Striped Socks


1
CSS Crazy Striped Socks
  • Jons Head, W3 Schools, Blooberry

2
What is CSS?
  • Cascading Style Sheets
  • Describes how to display HTML elements
  • Colors
  • Position
  • Font
  • Text decorations

3
A really long quote form the W3 Schools
  • HTML tags were originally designed to define the
    content of a document. They were supposed to say
    "This is a header", "This is a paragraph", "This
    is a table", by using tags like lth1gt, ltpgt,
    lttablegt, and so on. The layout of the document
    was supposed to be taken care of by the browser,
    without using any formatting tags.
  • As the two major browsers - Netscape and Internet
    Explorer - continued to add new HTML tags and
    attributes (like the ltfontgt tag and the color
    attribute) to the original HTML specification, it
    became more and more difficult to create Web
    sites where the content of HTML documents was
    clearly separated from the document's
    presentation layout.
  • To solve this problem, the World Wide Web
    Consortium (W3C) - the non profit, standard
    setting consortium, responsible for standardizing
    HTML - created STYLES in addition to HTML 4.0.  
  • All major browsers support Cascading Style Sheets.

4
Inline Syntax for CSS
  • lttag stylepropertyvalue property2value2gt
  • ltspan stylecolorredfont-size24ptgtJlt/spangt

5
What if I want all headings 1 to be blue and all
other headings to be red
  • ltheadgt
  • ltstyle type"text/css" gt
  • h1
  • colorblue
  • h2, h3, h4, h5, h6 colorred
  • lt/stylegt
  • lt/headgt

6
What if I want only some headings 1 to be green
  • CSS Classes
  • ltheadgt
  • ltstyle type"text/css" gt
  • h1
  • colorblue
  • font-size24pt
  • h1.blueHeadings
  • colorgreen
  • lt/stylegt
  • lt/headgt

7
Can I share the same styles over many pages
  • http//www.mikeindustries.com/blog/archive/2003/06
    /espn-interview
  • Save styles externally and import the style sheet
  • ltlink rel"stylesheet" type"text/css
    href"mystyle.css" /gt
  • Goes in the head

8
Why do we call them Cascading
  • Browser Default
  • External Style Sheets
  • Internal Style Sheets
  • Element Level
  • Class Level
  • Inline Styles

9
Pseudo Classes
  • ltheadgt
  • ltstylegt
  • alink color FF0000 / unvisited link /
    avisited color 00FF00 / visited link /
    ahover color FF00FF / mouse over link /
  • aactive color 0000FF / selected link /
  • ltstylegt
  • lt/headgt

10
What all can I do with css
  • http//www.Blooberry.com
  • http//www.csszengarden.com/
Write a Comment
User Comments (0)
About PowerShow.com