Web Workshop: CSS - PowerPoint PPT Presentation

About This Presentation
Title:

Web Workshop: CSS

Description:

Title: PowerPoint Presentation Last modified by: peter jacso Created Date: 1/1/1601 12:00:00 AM Document presentation format: On-screen Show Other titles – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 23
Provided by: hawaiiEdul9
Learn more at: http://www.hawaii.edu
Category:
Tags: css | table | web | workshop

less

Transcript and Presenter's Notes

Title: Web Workshop: CSS


1
Web Workshop CSS
Web Workshop CSS
  • Objectives
  • - What is CSS?
  • - Structure of CSS
  • - How to use CSS in your webpage

2
What is CSS? (1)
What is CSS?
  • CSS stands for Cascading Style Sheets
  • Cascading refers to the procedure that
    determines which style will apply to a certain
    section, if you have more than one style rule.

3
What is CSS? (2)
What is CSS?
  • CSS stands for Cascading Style Sheets
  • Style how you want a certain part of your page
    to look. You can set things like color, margins,
    font, etc for things like tables, paragraphs, and
    headings.

4
What is CSS? (3)
What is CSS?
  • CSS stands for Cascading Style Sheets
  • Sheets the sheets are like templates, or a set
    of rules, for determining how the webpage will
    look.

5
What is CSS? (4)
What is CSS?
  • So, CSS (all together) is a styling language a
    set of rules to tell browsers how your webpage
    should look.

6
What is Style?
What is Style
  • Style is a command that you set to tell the
    browser how a certain section of your webpage
    should look.
  • You can use style on many HTML elements
  • (like ltpgt lth1gt lttablegt etc)

7
How to write style rules (1)
How to write style rules
  • Two parts (1) selector and (2) declaration.
  • Selector the HTML element you want to add style
    to.
  • ltpgt lth1gt lttablegt etc
  • Declaration the statement of style for that
    element. Made up of property and value.

8
How to write style rules (2)
How to write style rules
  • Selector declaration
  • Declaration property value
  • Property what aspect you want to change
  • ex color, font, margins, etc.
  • Value the exact setting for that aspect.
  • ex red, italic, 40px, etc.

9
How to write style rules (2)
How to write style rules
  • selector property value
  • Essentially means
  • The thing I want to change
  • the aspect of that thing I want to change what
    I want it to be

10
How to write style rules (3)
How to write style rules
  • Selector property value
  • h1 color red
  • Means Speaking of my heading1, I want the text
    color to be red.

11
How to write style rules (3)
How to write style rules
  • Selector property value
  • I want the color of the text in my paragraph to
    be yellow.

color
yellow
p
This is the text in this paragraph.
12
How to write style rules (4)
How to write style rules
  • Selector property value
  • h1 color blue
  • background-color green
  • Means
  • Speaking of my heading1, I want the text color to
    be blue and the background color to be green.

13
How to write style rules (4)
How to write style rules
  • Selector property value
  • I want the text color of my link to be red and
    the background color to be yellow.

a
color
red
background-color
yellow
This is my link
14
Three types of style
Where do I put my style rules?
  • There are three types of style-rule-places that
    we will cover
  • - Inlined
  • - Internal Style Sheet
  • - External Style Sheet

15
a) Inlined example-1
  • lthtmlgt
  • ltheadgtlttitlegtMy Wonderful Examplelt/titlegt
  • lt/headgt
  • ltbodygt
  • ltpgtWhat was I thinking?lt/pgt
  • lt/bodygt
  • lt/htmlgt

Original html code
16
a) Inlined example-2
  • ltbodygt
  • ltp styletext-align center font- weight
    bold color yellowgtWhat was I thinking?lt/pgt
  • lt/bodygt
  • What was I thinking?


17
b) Internal-1
ltheadgtlttitlegtMy Wonderful Examplelt/titlegt
ltstyle typetext/cssgt body
text-align left font-family trebuchet,
verdana lt/stylegt lt/headgt
18
b) Internal-2
ltheadgtlttitlegtMy Wonderful Examplelt/titlegt
ltstyle typetext/cssgt body
text-align left font-family
Trebuchet, verdana lt/stylegt lt/headgt
19
Internal Statement of style
this is a style sheet (style type) written (text)
in css (CSS) language
  • ltstyle typetext/cssgt
  • lt/stylegt


20
Internal Brackets Declaration
I want the align text property to be given the
value of left
  • ltstyle typetext/cssgt
  • body
  • text-align left font-family trebuchet,
    verdana
  • lt/stylegt

21
c) External
  • lthtmlgt
  • ltheadgtlttitlegtMy Waylt/titlegt
  • ltlink rel"stylesheet" href"http//www2.hawaii
    .edu/myway. css" type"text/cssgt
  • lt/headgt
  • ltbodygt lt/bodygt
  • lt/htmlgt


Link to a separate css page
22
The end of Basic CSS On to the exercises!
Write a Comment
User Comments (0)
About PowerShow.com