Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.

Slides:



Advertisements
Similar presentations
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Advertisements

Web Development & Design Foundations with XHTML Chapter 3 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
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,
Web Development & Design Foundations with XHTML Chapter 3 Key Concepts.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Web Development & Design Foundations with HTML5
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
© 2007 D. J. Foreman CSS-1 Cascading Style Sheets Styles.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
HIGHER COMPUTING CSS. WHAT IS CSS? CSS: Cascaded Style Sheets used to separate a web site’s content(information) from its style(how it looks).
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 Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
HTML - Quiz #2 Attendance CODE:
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 4.  Three ways to apply CSS: Inline CSS Internal style sheets ( header style information) External style sheets.
The Characteristics of CSS
HTML & CSS.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Today’s objectives  Complete web page  Using xhtml & CSS  Adding CSS to documents Embed url(File);  CSS.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Today’s objectives  Presentational | Inline | Block | Validate  CSS | Rules | Declarations.
Cascading Style Sheets Class 1, Lecture 1 Rachel A Ober
I NTRO TO CSS IAT100 Spring I NTRO TO CSS Covered in this lesson: Overview What is CSS? Why to use CSS? CSS for Skinning your Website Structure.
Cascading Style Sheets
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit E Formatting with Cascading Style Sheets.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
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.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
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.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
Cascading Style Sheets Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
Files you will need ... Black Goose Bistro Summer Menu
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets Level 2. Course Objectives, Session 1 Level 1 Quick Review Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your.
Cascading Style Sheets
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
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.
OV Copyright © 2008 Element K Content LLC. All rights reserved.  Format Text  Format Lists  Format Images  Modify Page Background Applying Styles.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
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.
Style Sheets. Coding Style Sheets  Style sheets use RULES to create the style  A selector (a tag or user-defined style name)  and then declarations.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
CSS DHS Web Design. Location Between the & Start with – End with –
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) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents Dr. Irwan Sembiring,ST.,M.Kom.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
Web Development & Design Foundations with XHTML
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Web Development & Design Foundations with HTML5
Web Developer & Design Foundations with XHTML
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Web Development & Design Foundations with HTML5
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Web Development & Design Foundations with H T M L 5
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2016 Terry Ann Morris, Ed.D.
Presentation transcript:

Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris

CSS SELECTORS CSS style rules can be configured for an:  HTML element selector  class selector  id selector  descendant selector 2

Copyright © Terry Felke-Morris USING CSS WITH “CLASS”  class Selector  Apply a CSS rule to a certain "class" of elements on a web page  Does not associate the style to a specific HTML element  Configure with.classname  code CSS to create a class called “new” with red italic text.  Apply the class: This is text is red and in italics 3.new { color: #FF0000; font-style: italic; }

Copyright © Terry Felke-Morris USING CSS WITH “ID”  id Selector  Apply a CSS rule to ONE element on a web page.  Configure with #idname  Code CSS to create an id called “new” with red, large, italic text.  Apply the id: This is text is red, large, and in italics 4 #new { color: #FF0000; font-size:2em; font-style: italic; }

Copyright © Terry Felke-Morris CSS DESCENDANT SELECTOR  Specify an element within the context of its container (parent) element.  AKA contextual selector  The example configures a green text color only for p tags located within an element assigned to the id named content  Advantage of contextual selectors: Reduces the number of classes and ids you need to apply in the HTML 5 #content p { color: #00ff00; }

Copyright © Terry Felke-Morris HANDS-ON PRACTICE 3.4 (PAGE 101)  chapter3/embedded2.html  chapter3/embedded3.html 6

Copyright © Terry Felke-Morris SPAN ELEMENT  Purpose:  configure a specially formatted area displayed in-line with other elements, such as within a paragraph.  There is no additional empty space above or below a span – it is inline display. 7

Copyright © Terry Felke-Morris SPAN ELEMENT EXAMPLE  Embedded CSS:.companyname { font-weight: bold; font-family: Georgia, "Times New Roman", serif; font-size: 1.25em; }  HTML: Your needs are important to us at Acme Web Design. We will work with you to build your Web site. 8

Copyright © Terry Felke-Morris HANDS-ON PRACTICE 3.5 (PAGE 103)  chapter3/embedded3.html  chapter3/embedded4.html 9

Copyright © Terry Felke-Morris EXTERNAL STYLE SHEETS - 1  CSS style rules are contained in a text file separate from the HTML documents.  The External Style Sheet text file:  extension ".css"  contains only style rules  does not contain any HTML tags 10

Copyright © Terry Felke-Morris body {background-color:#E6E6FA; color:#000000; font-family:Arial, sans-serif; font-size:90%; } h2 { color: #003366; }.nav { font-size: 16px; font-weight: bold; } body {background-color:#E6E6FA; color:#000000; font-family:Arial, sans-serif; font-size:90%; } h2 { color: #003366; }.nav { font-size: 16px; font-weight: bold; } EXTERNAL STYLE SHEETS - 2  Multiple web pages can associate with the same external style sheet file. 11 site.css index.html clients.html about.html Etc…

Copyright © Terry Felke-Morris LINK ELEMENT  A self-contained tag  Placed in the header section  Purpose: associates the external style sheet file with the web page.  Example: 12

Copyright © Terry Felke-Morris USING AN EXTERNAL STYLE SHEET To associate the external style sheet called color.css, the HTML code placed in the head section is: body { background-color: #0000FF; color: #FFFFFF; } External Style Sheet color.css 13

Copyright © Terry Felke-Morris HANDS-ON PRACTICE 3.6 (PAGE 104)  chapter2/template.html  chapter3/color.css  chapter3/external.html 14

Copyright © Terry Felke-Morris HANDS-ON PRACTICE 3.7 (PAGE 106)  chapter3/embedded4.html  chapter3/3.7/index.html  chapter3/3.7/services.html  chapter3/3.7/trillium.css 15