HTML - Quiz #2 Attendance CODE: 803655

Slides:



Advertisements
Similar presentations
Today CSS HTML A project.
Advertisements

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.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
“Cascading Style Sheets” for styling WWW information DSC340 Mike Pangburn.
กระบวนวิชา 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.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Controlling Page Style: Cascading Style Sheets (CSS) References: 1.Wang, P.S & Katila, S. (2004). A Introduction to Web Design and Programming. CA: Thomson.
1 Cascading Style Sheets C S S. 2 What is CSS? A simple mechanism for controlling the style of a Web document without compromising its structure. It allows.
4.01 Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
W EB S ITE L ECTURE C ASCADING S TYLE S HEETS. Cascading Style Sheets (CSS) Introduction CSS Objectives – Provide more control over web site content presentation.
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
CSS Dvijesh Bhatt.
HTML - Quiz #2 Attendance CODE:
HTML/CSS Hyper Text Markup Language. CSS Cascading Style Sheets.
Cascading style sheets (CSS)
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.
Today’s objectives  Complete web page  Using xhtml & CSS  Adding CSS to documents Embed url(File);  CSS.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit E Formatting with Cascading Style Sheets.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Cascading Style Sheets Chapter Four. What are they? A set of style rules that tell the web browser how to present a web page or document. Cascading Style.
CSS. HTML: Looking Back HTML dictates order, structure, and function Does very little to specify layout or visual rendering.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
The Web Wizard’s Guide To DHTML and CSS Chapter 1 A Review of CSS1.
ALBERT WAVERING BOBBY SENG. Week 2: HTML + CSS  Quiz  Announcements/questions/etc  Some functional HTML elements.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
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.
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.
More CSS.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
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.
So far, we have looked at CSS selectors that correlate with HTML tags Now, we’ll see how you can define your own selectors using class and ID selectors.
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). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
CSS FOUNDATIONS IN-DEPTH The nitty-gritty of css...
Web Design (15) CSS Opacity, Link Colours & Background Images.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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,
CSS Cascading Style Sheets. Session Checklist ► Learn why style sheets are needed and their advantages and disadvantages ► Learn the format of a style.
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.
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:

HTML - Quiz #2 Attendance CODE:

Today’s Agenda Quiz Announcements CSS Introduction Software

Announcements Mini Project 1 due this morning at 12AM Mini Project 2

Web Design: Basic to Advanced Techniques Spring 2010 Tuesdays 7-8pm 200 Sutardja-Dai Hall CSS Introduction

What is CSS? Takes our plain-Jane HTML doc and turns it into this…

What is CSS? …continued Cascading Style Sheets Works by associating styles with HTML elements Allows us to separate display code from our structural code (HTML) Allows us to format documents beyond what HTML would allow on its own Avoids repetition of code Smaller files Less bugs Consistent look Standardized by WC3 (W3.org) Online validator

CSS Syntax CSS rules go into a file with.css extension body { font-weight: bold; } selectorpropertyvalue Rule Every declaration Terminated by ; Style.css

CSS Selectors We need a way to label the HTML elements we want to style so we can refer to them in our separate CSS code Style.css #myEle { font-weight: bold; font-size: 20px; }

Element Selector We can select HTML elements by their element type HTML Document Image Page Here’s a description of the image you see above CSS Style Sheet img { border: 1px solid #333; } p { font-color: #333; }

Class / ID Selector We can tag HTML elements by giving them an # id or. class HTML Document Here’s a description of the image you see above Here’s the photo equipment I used Here’s where I took the photo CSS Style Sheet #description { font-color: red; }.extraInfo { font-color: blue; }

Class / ID Selector..continued ID Used to identify ONE particular HTML element Must be unique for entire document Class Used to identify ONE or MORE HTML elements

Universal Selector We can select all HTML elements HTML Document Image Page Here’s a description of the image you see above Here’s the photo equipment I used Here’s where I took the photo CSS Style Sheet * { font-family: verdana, arial, helvetica, sans-serif; color: #000; }

Pseudo Class Selector Link a:visited { color: red; } a:hover { font-weight: bold; } a:active { color: blue; } :visited After a link has been clicked :hover When your mouse cursor is over the HTML object :active While a link is being clicked

Combining Selectors Descendant (nested) Selects by nested structure p span { color: red; }.description a { color: blue; } Combined Selects between elements of same class p.info { color: red; } a.info { color: #FFF; } Grouped Applies style to list a, p, span { color: red; } para link a link a span a link a span a link a span para link para link a para a link a span a para a link a span

Specificity Text p { color: red; }.para { color: blue; } #myPara { color: green; } What color is the text? GREEN

Specificity …continued #id >.class > element p { color: red; }.para { color: blue; } #myPara { color: green; } TEXT

Attaching CSS Styles After we write our CSS rules we need to link our rules to our HTML document External Style Sheets Inline Styling Embedded Style Sheets HTML CSSHTML & CSS

External Style Sheets ”/style.css Most common way to link CSS to HTML CSS and HTML in separate files Same CSS rules throughout site Best practice!

Inline Styling Useful for single cases Poor practice to use this extensively throughout site If applying same style to multiple elements, consider using class instead red text

Embedded Style Sheets Like inline styling, only use this for exceptions If elements in this page are styled differently than the rest of the site Try to avoid ever using this Better option is to link to another.CSS file p { color: red; }

Multiple Style Sources HTML documents can include multiple sources of CSS styles A HTML document may link to any number of external style sheets In addition to those style sheets, the documents may use inline styling and embedded style sheets SomeHTMLDoc.html ”/style.css ”/style2.css ”/style3.css

Cascade Order Proximity: Inline > Embedded > External Last style wins Rules in last style sheet overwrite previous rules Style.css p { color: red; font-weight: bold} Style2.css p { color: green; } Style3.css p { color: blue; } some text some text some text some text

Software Dreamweaver’s tools Firebug for Firefox Lets you modify CSS in realtime

Useful CSS All Objects color: #FFF / #FFFFFF / white; font-size: 12px; font-weight: bold / normal; text-decoration: none / underline; background-color: #FFF / #FFFFFF / white; Block Objects margin: 10px 20px; padding: 10px 20px; background-image: url(‘/images/background.gif’); background-repeat: no-repeat / repeat-x / repeat-y / repeat; background-position: 10px 0px; border: 1px solid #000; text-align: left / center / right;