Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
Cascading Style Sheets
CHAPTER 8 ADVANCED CSS. LEARNING OBJECTIVES Assign formatting styles to a CSS class definition Use a tag’s class attribute to apply the styles defined.
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
SM5312 week 6: basic CSS syntax1 An Introduction to Cascading Style Sheets Basic CSS Syntax Nick Foxall.
CSS: Cascading Style Sheets. What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
Cascading Style Sheets 26 th March. Introduction 1. CSS types 2. Pseudoclasses and pseudoelements 3. Other considerations 4. Worked example.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS: Cascading Style Sheets. 2 History HTML tags were originally designed to define the content of a document. The layout of the document was supposed.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
1 Web Developer Foundations: Using XHTML Chapter 9 Cascading Style Sheet Concepts.
Cascading Style Sheets Part 1 Library and Information Services, University of St Andrews.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Cascading Style Sheet (CSS)
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
Doman’s Sections Information in this presentation includes text and images from
Cascading Style Sheets Class 1, Lecture 1 Rachel A Ober
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
Website Development & Management Working with Style Rules Instructor: John Seydel, Ph.D. CIT Fall
Part 1: CSS - Why? - How it works - Writing rules - Examples.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Cascading Style Sheets CSS by Pavlovic Nenad by. 2Cascading Style Sheets Presentation Contents What are CSS? What are CSS? History of CSS History of CSS.
Tutorial #4 Formatting Text and Links. Tutorial #3 Review - CSS CSS format Selector { property1: value1; /* Comments */ } Embedded, In-Line, and External.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
Tutorial 5 Formatting with CSS. Objectives Session 5.1 – Evaluate why CSS styles are used – Determine where to write styles – Create an element selector.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
MySQL and PHP Review CSS. Cascading Style Sheet (CSS) Style sheets are files or forms that describe the layout and appearance of a document. Cascading.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
The Web Wizard’s Guide To DHTML and CSS Chapter 1 A Review of CSS1.
Cascading Style Sheets
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Lesson 15: Cascading Style Sheets. Objectives Identify ways to apply Web page formatting with Cascading Style Sheets (CSS1 and CSS2) using various methods.
1 Web Development CSS (Cascading Style Sheet). 2 1.Setting rules for multiple elements To decrease the amount of typing for setting rules for multiple.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
CSS – 1h. Without stylesheets proprietary HTML extensions making text into images proliferate use of "spacer" GIF images deprecated HTML elements and/or.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates.
Developing Web Applications with HTML and CSS “Selectors and Properties”
CSS: Cascading Style Sheets Part II. Style Syntax.
1 CSS: Cascading Style Sheets W3Schools CSS tutorialCSS tutorial.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
CSCE Chapter 3 (Cascading Style Sheets) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department of Computer.
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Cascading Style Sheets Robin Burke ECT 270. Outline CSS properties Fonts Alignment Color CSS selection selectors.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
Cascading Style Sheets
Cascading Style Sheets
Presentation transcript:

Cascading Style Sheets Scripting with Style

CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with Tables

Content versus Design  HTML was originally written for content –H1 different in different browsers, but not a big deal at first

Why Use CSS Then?  CSS allows you to separate design from content

CSS History  CSS1 (1996)  CSS2 (1998)  IE 3-6 versus Netscape 4.7x, 6.x, and 7.x –IE3 = some, IE4 = CSS1, IE5.x = almost there for CSS1 –IE6 – works well, but still has proprietary items  Netscape –Not there yet, but some support. –7.x is close  Opera –CSS compliant

Style Types  Inline style  Embedded style  External style

Inline Style  Individual tag on an HTML document My Title

Embedded Style  Entire HTML document selector {attribute:value; attribute:value;}

Embedded Example h1, h2, h3 {color: red; font-family: sans-serif;} h4 {color:#0000FF; font-family: sans-serif;} A:LINK {font-family: Verdana; font-size:11pt; font- weight: bold; color: #336633; TEXT-decoration: none;}

External Style  Any number of HTML documents  Separate file

External Example <!-- body {font-family: verdana; color: #000000; text-align: left; background:#ffffff;} a:link {font-family: verdana; font-size:11pt; font-weight: bold; color: #336633; text-decoration: none;} a:visited {font-family: verdana; font-size:11pt; font-weight: bold; color: #660066; text-decoration: none;} -->

Why Cascading?  Style Precedence –Internal over embedded and external –Embedded over external –External –Unless specifically set by user, style will overcome most browser default settings.

Inheritance (still cascading)  Figure 7-10 (7.14)  Figure 7-13 (7.16)  Parents and Descendants  Contextual Selectors –li b{color:#00FF00}

Various Font and Text elements  Font Families (7.18)  Font Size (7.20)  Spacing (7.22)  Aligning text (7.25)  Much more in this section...

Backgrounds  Various color settings (7.30)  Background images (7.32)  Once again check browser displays

Hyperlinks  a: {text-decoration: none}  a: visited {}  a: link {}  a: active {}  a: hover {}

IDs (7.43)  pseudo-class  pseudo-elements  Hyperlinks are an example  Also have items like –p: first-letter{font-size:200%} –p: first-letter {text-transform: uppercase}  Cross-browser issues

Classes (7.43)  Way to create, define, and use elements In HTML document Here you go.

Class Example In stylesheet h3.special {color:#FFFF00; font-style: italic;} In HTML This is yellow italic. or... This is yellow italic.

DIV and SPAN tags  Block level text elements  Inline elements

Why use DIV or SPAN?  IE versus Netscape ( )  See HTML in Figure 7-55

CSS and DHTML  A large portion of programming that is taking hold, but browser specifications are making it difficult.

Let's Play  Let's work on a short CSS exercise –