CSS: Separating Design and Content Kevin Campbell Duke University/Grouchyboy.com.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
Advertisements

Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
MSc. Publishing on WWW Tables and Style Sheets. Tables Tables are used to: Organize and display tabular data To create a layout for web pages.
HCI 201 Week 6 Client Side Image Maps Introduction to CSS.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
Cascading Style Sheet. What is CSS? CSS stands for Cascading Style Sheets. CSS are a series of instruction that specify how markup elements should appear.
1 Web Developer Foundations: Using XHTML Chapter 9 Cascading Style Sheet Concepts.
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
 ult.htm ult.htm  This website illustrates the use of CCS (style sheets)
Different ways to implement CSS. There are four different ways to use CSS in your web pages: – Inline CSS – Embedded CSS/Internal CSS – Linked CSS/External.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Multimedia & The World Wide Web winny HCI 201 Multimedia and the www.
The Characteristics of CSS
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Styles with Cascading Style Sheets (CSS) Web Design – Section 4-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design.
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.
MIS 425 Lecture 3 – HTML 5 and CSS Instructor: Martin Neuhard
Css. Definition Cascading style sheet (CSS) Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
 cascade Style Sheets (CSS) is a mark-up language that was first proposed in 1994 by Håkon Wium Lie. CSS works in conjunction with HTML to greatly increase.
Internet Web Publishing III. Intro to Cascading Style Sheets Patricia Roberts.
Introduction to Cascading Style-sheets (CSS) Basharat Mahm ood, Department of Computer Science, CIIT,Islamabad, Pakistan 1.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
INTRODUCTION TO CSS. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features of CSS Features of CSS  Creating Style Sheet Creating Style Sheet.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Cascading Style Sheets CSS. Source W3Schools
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
Cascading Style Sheets
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
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.
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
Cascading Style Sheets (CSS) EXPLORING COMPUTER SCIENCE – LESSON 3-5.
Practice for Chapter 3: Assume that you are a freelance web designer and need to create a website to promote your freelance company.
Introduction. MIS 5450 Behavioral Layer JavaScript and DOM Structural Layer XHTML Presentation Layer CSS Design Development Process.
CSS Cascading Style Sheets Prepared By
What is CSS? A set of style rules that tell the web browser how to present a web page or document. – In earlier versions of HTML, style characteristics,
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…
CM143- WEB CM143-WEB Page Layout live sites HTML Images User Considerations Planning Navigation CSS Architecture File Management Cascading Style Sheets.
CASCADING STYLE SHEET CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
Cascading Style Sheets (CSS) Internal Style Sheets Classes
CSS Cascading Style Sheets
Getting Started with CSS
4.01 Cascading Style Sheets
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Cascading Style Sheets
Cascading Style Sheets
Styles with Cascading Style Sheets (CSS)
>> CSS Rules Selection
CX Introduction to Web Programming
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Styles with Cascading Style Sheets (CSS)
Dynamic HTML.
Web Development & Design Foundations with HTML5
CASCADING STYLE SHEET CSS.
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
CSS: Cascading Style Sheets
Made By : Lavish Chauhan & Abhay Verma
4.01 Cascading Style Sheets
Presentation transcript:

CSS: Separating Design and Content Kevin Campbell Duke University/Grouchyboy.com

Assumptions  You know HTML  You do not know CSS  You care about aesthetics and function  You have 50 minutes to kill

What We’ll Do  What is CSS?  View some code and talk basics  Why use CSS? Advantages to Workflow Cost Savings  Implementations  Resources

What are Cascading Style Sheets?  Created by Hakon Wium Lie of MIT in 1994  Has become the W3C standard for controlling visual presentation of web pages  Separates design elements from structural logic  You get control and maintain the integrity of your data

Let’s See Some Code  Sample Style sheet Sample Style sheet  Rule Structure

Selectors  Element Selectors – (refer to HTML tags) H1 {color: purple;} H1, H2, P {color: purple;}  Contextual – (refer to HTML, but in context) LI B {color: purple;}

Selectors  Class Selectors Danger! Be careful… ……. In your HTML code - H1.warning {color: red;} OR to an entire class….warning {color:red;}

Applying CSS to HTML  Style rules can be applied in 3 ways: Inline Styles: A large purple Heading For individual elements using the STYLE attribute Embedded style sheets: Stylin’! H1 {color: purple;} P {font-size: 10pt; color: gray;} … External style sheets: <LINK REL=stylesheet” TYPE=“text/css” HREF=“styles/mystyles.css”> This is true “separation” of style and content. Keeping all your styles in an external document is simpler

Why CSS?  Advantages to Workflow  Cost Savings  You WILL Be Cooler

Advantages of CSS  Workflow Faster downloads Streamlined site maintenance Global control of design attributes Precise control (Advanced)  Positioning  Fluid layouts

Advantages of CSS - Cost Savings  Cost Savings Reduced Bandwidth Costs  One style sheet called and cached Higher Search Engine Rankings  Cleaner code is easier for search engines to index  Greater density of indexable content

Advantages of CSS - Cost Savings  Faster download = better usability Web usability redesign can increase the sales/conversion rate by 100% (source: Jakob Nielson)Jakob Nielson CSS requires less code Tables require spacer images Entire table has to render before content CSS can control the order that elements download (content before images)

Advantages of CSS - Cost Savings  Increased Reach CSS website is compatible w/ many different devices In 2008 an est. 58 Million PDA’s will be sold (Source: eTForecast.com) 1/3 of the world’s population will own a wireless device by 2010

Implementations  Apply to HTML pages  Apply to dynamic data Format or style XML  Use for layout (this is cool) See

CSS isn’t perfect (yet)  CSS support in browsers is still uneven  Make sure your CSS properties are supported

Resources  This is CSS at its finest  The Official CSS Site  Australian firm, very professional  monkey/reference/stylesheet_guide monkey/reference/stylesheet_guide Where I learned CSS and Web Design

Come and see me at 3:30pm!  “Making Your Web Site More Appealing”