Cascading Style Sheets Class 1, Lecture 1 Rachel A Ober

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

Cascading Style Sheets
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
ICS-FORTH 1 May 22, 2001 Christos Georgis The extensible markup language: An introduction to XML What is a XML document ? How do we check its validity.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Prepared by ackoo Styli n g your page (font type, font size, colors, text decoration, alignment, set margin, table padding, etc.) References: W3Schools.
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.
Controlling Page Style: Cascading Style Sheets (CSS) References: 1.Wang, P.S & Katila, S. (2004). A Introduction to Web Design and Programming. CA: Thomson.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
1 Web Developer Foundations: Using XHTML Chapter 9 Cascading Style Sheet Concepts.
Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Cascading Style Sheets Example
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Doman’s Sections Information in this presentation includes text and images from
Jeanine
Introduction to CS520/CS596_026 Lecture One Gordon Tian Fall 2015.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 14, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
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.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
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 #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
Cascading Style Sheets Class 2, Lecture 3 Rachel A Ober
HTML - Quiz #2 Attendance CODE:
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.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
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.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
Cascading Style Sheets
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
CSS Cascading Style Sheets. Cascading Style Sheet (CSS) A cascading style sheet (CSS) is a set of rules that define styles to be applied to entire Web.
Cascading Style Sheets CSS. Source W3Schools
Cascading Style Sheets (CSS). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
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.
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
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.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
CSS: Cascading Style Sheets Part II. Style Syntax.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Introduction to CS520/CS596_026 Lecture One Gordon Tian Fall 2015.
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 Robin Burke ECT 270. Outline CSS properties Fonts Alignment Color CSS selection selectors.
1 Cascading Style Sheets
Presentation transcript:

Cascading Style Sheets Class 1, Lecture 1 Rachel A Ober

What is “CSS”? CSS stands for “Cascading Style Sheet” It is used to define how HTML is displayed. Styles can be stored in external style sheet documents and in the document itself. Style Sheets were implemented in HTML 4.0 to fix the problems caused by Netscape and Internet Explorer who were coming up with different tags to display content. CSS is a standard developed by the W3C to separate content from display.

Why is CSS Important in Design? HTML was originally developed so that different sections of the document were divided up with different tags. The two major browsers, IE and Netscape, constantly added new tags that they supported, such as. This caused a problem where design in the document could not be separated from the content. What if I have over 100 pages, and now I need to change one design element that’s hard-coded into each document?

Let’s Compare… We can accomplish the same design by using HTML tags, OR we can separate the content from design by setting up a style sheet. What if I have 50 documents and want to change the color of the word “different”?

The HTML… uh, eww? Untitled Document This is a Header This is a paragraph with some text. Hey, I have a link ! What about some bold and some different colors. OOh, what about a table?

New HTML… Untitled Document This is a Header This is a paragraph with some text. Hey, I have a link ! What about some bold and some different colors. OOh, what about a table?

Our Style Sheet a { color: #663333; } a:visited{ color: #FF00FF; } a:active{ color: #999933; } body { color: #000000; background-color: #999999; margin: 3px; } b { font-weight: bold; color: #FF0000; } h1 { font-style: italic; color: #9933CC; } table { padding: 10px; margin: 10px; width: 75%; border: 10pt solid; }.center { text-align: center; }.purple { color: #990099; }.bigandblue { font-size: 40px; color: #0000CC; } All we need to change!

Side by Side Comparison…

How to Include CSS… In a separate, linked file included in the header Within the file header <!-- body {font-family: "Times New Roman", Times, serif;} --> Inline This is a paragraph with some text.

What Can I Manipulate? Pre-Defined Tags,,, etc… Pseudo-Classes a:visited{color: #FF00FF;} Pseudo-Elements p:first-letter {color: #0000CC;} Your Own Classes and IDs The “:visited” part is considered a “pseudo-class” The “:first-letter” part defines the first letter of the paragraph. All paragraphs in the doc will have the first letter blue.

Classes Vs. IDs There are two ways to identify your own created style in a document. Classes are used for a site-wide style. Perhaps I want a class called “header” that I use on all of my pages. IDs are used for very specific content. Perhaps I want the second paragraph in “index.html” to have a certain style.

How to Use Them Classes Denoted with a “.” p.center {text-align: center;} … IDs Denoted with a “#” p#blue {color: #0000CC;} … Note: Do not start Classes or IDs with a number! It won’t work in FireFox

Lab #1: Recreating Styles Objective: Get familiar with styles and how to use them. Look at the HTML and try to find a way to convert it into a style sheet. The customer wants a style, how do you go about designing it? Stock Images for use: