Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML Programming the World Wide Web Fourth edition.
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2003 Pearson Education, Inc. Slide 5-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Copyright © 2003 Pearson Education, Inc. Slide 4-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
Copenhagen, 6 December 2004 Modern CSS Principles Miruna Bădescu Finsiel Romania.
Cascading Style Sheets
1 © Netskills Quality Internet Training, University of Newcastle Introducing Cascading Style Sheets © Netskills, Quality Internet.
1 A Tool-box for Web-site Maintenance Manjula Patel UKOLN University of Bath Bath, BA2 7AY UKOLN is funded by the Library and Information Commission, the.
September Public Library Web Managers Workshop 2000 Cascading Style Sheets Manjula Patel UKOLN University of Bath Bath, BA2 7AY UKOLN is funded.
Slice and Dice: From PSD Image to XHTML+CSS Svetlin Nakov Telerik Corporation
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
HTML Tags and Their Functions
Table, List, Blocks, Inline Style
1 Tables and Lists. 2 Are Tables still needed? Tables were once used to help structure and style our pages CSS now replaces most of the old uses for tables.
Creating Tables in a Web Site
Benchmark Series Microsoft Excel 2013 Level 2
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
XHTML Week Two Web Design. 2 What is XHTML? XHTML is the current standard for HTML Newest generation of HTML (post-HTML 4) but has many new features which.
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT WORD Lesson 8 – Increasing Efficiency Using Word.
Dr. Alexandra I. Cristea HTML Dr. Alexandra I. Cristea
Dr. Alexandra I. Cristea XHTML.
Dr. Alexandra I. Cristea CSS Dr. Alexandra I. Cristea Source:
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Essential Cell Biology
Chapter 13 Web Page Design Studio
Energy Generation in Mitochondria and Chlorplasts
Know About E-CTLT Teachers Panel and working area.
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
1 Cascading Style Sheets™ (CSS) Outline 5.1 Introduction 5.2 Inline Styles 5.3 Embedded Style Sheets 5.4 Conflicting Styles 5.5 Linking External Style.
Today CSS HTML A project.
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.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
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.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
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.
1/18 ITApplications XML Module Session 5: Extensible Stylesheet Language (XSL)
กระบวนวิชา 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.
Chapter 8 Creating Style Sheets.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
4.01 Cascading Style Sheets
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
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.
4.01 Cascading Style Sheets
Web Developer & Design Foundations with XHTML
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
4.01 Cascading Style Sheets
Presentation transcript:

Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes

Copyright © 2003 Pearson Education, Inc. Slide 3-2 CHAPTER 3 Adding Cascading Style Sheets to XHTML Documents

Copyright © 2003 Pearson Education, Inc. Slide 3-3 Cascading Style Sheets (CSS) Cascading Style Sheets (CSS) were introduced by the W3C in 1996 to provide HTML authors with more control over document formatting CSS style sheets work with XHTML, XML and HTML files and are widely accepted by Web browsers A single style sheet can be used to provide uniform formatting styles to a group of documents CSS files are plain text files and can be edited with a text editor CSS files can be validated on-line at the W3Cs website:

Copyright © 2003 Pearson Education, Inc. Slide 3-4 Cascading Style Sheets (CSS) Why use Style Sheets? Allows for the separation of content and presentation Allows for multiple presentation layouts for a single document Allows a single style document to format many documents Style elements are being deprecated in the XHTML language and will not be available in future versions of XHTML past the 1.0 version The element set of XHTML 1.0 Strict will be most compatible with future versions as it does not contain many of the presentational elements that the Transitional and Frameset versions contain

Copyright © 2003 Pearson Education, Inc. Slide 3-5 CSS Syntax – Defining styles Three ways to define CSS styles Linked Style Sheets – style sheets stored in separate files from the XHTML document (usually with the file extension.css): Global Style Sheets – defined in the header section of an XHTML document within the element: <!-- p { color: red; font-family: arial } --> Inline Style – defined within an XHTML element and will apply to only that instance of the element: Paragraph text

Copyright © 2003 Pearson Education, Inc. Slide 3-6 CSS Syntax - Properties Major property categories: Font properties – defines font styles such as font type or color Text properties – defines the layout of blocks of text like character spacing and alignment Color and image properties – defines the color and/or background formatting for text and images Border properties – defines the style of borders around an image, a table, a block of text or the entire document Display properties – defines styles for the structure of the document such as whitespace is formatted within the document

Copyright © 2003 Pearson Education, Inc. Slide 3-7 CSS Syntax - Rules CSS rules consists of two parts: Element selector Properties declarations CSS rule example: h1, h2 { color: black; font-size: 12pt; font-family: arial } CSS comments: /* This is a comment */

Copyright © 2003 Pearson Education, Inc. Slide 3-8 CSS Link Rules CSS provides special properties to control the colors associated with links defined by the element link – used for links that have not yet been visited: a: link visited – used for links that have been visited: a:visited active – used when the user clicks on the link: a:active hover - used when the user places the mouse cursor over a link: a:hover

Copyright © 2003 Pearson Education, Inc. Slide 3-9 CSS Example – CSS File 1 strong { 2 font-weight:bold; 3 text-align:left; 4 background-color: yellow; 5 text-decoration:underline 6} 7 li { 8 font-style:italic; 9 color:purple; 10}

Copyright © 2003 Pearson Education, Inc. Slide 3-10 CSS Example – XHTML code 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " Introduction to XHTML Course Name: Introduction to XHTML 11 Course Number: CS Instructor: T. Perdue 13 Meeting Time: Wednesday, 5:30pm - 7:30pm Course Description: This course covers the basics 16 of how to write XHTML web documents Prerequsites: CS Introduction to Computers 21 CS Introduction to Website Design 22 CS Designing Web pages with HTML

Copyright © 2003 Pearson Education, Inc. Slide 3-11 CSS Example – No Style Sheet

Copyright © 2003 Pearson Education, Inc. Slide 3-12 CSS Example – Using Style Sheet

Copyright © 2003 Pearson Education, Inc. Slide 3-13 CSS Syntax – Classes and IDs The class and id attributes are used to define styles that are independent of elements and can be used with almost all of the elements in the XHTML element set Use classes and ids when you need different styles for the same element or elements The id attribute can only occur once within an XHTML document, so do not use it to define styles for multiple elements The class attribute can be used to define styles for any number of elements Class selector: Style sheet:.class_example { color: red; } XHTML document reference: ID selector: Style sheet: #id_example { color: black; } XHTML document reference:

Copyright © 2003 Pearson Education, Inc. Slide 3-14 CSS Examples Using Classes and IDs 1 /* Defines a class called underline */ 2 div.box { 3margin-top: 50px; 4background-color: yellow; 5color: #000090; 6border-style: double; 7padding: 10px; 8border-color: # } /* Defines styles for the element */ 12 p { 13font-size: 16pt 14 } /* Defines specific properties for the element 17 with the class name of description */ 18 p.description { 19color: #000099; 20background-color: #cccccc; 21font-style: italic 22} /* Define a unique id selector that will be applied 25 to one element within the document */ 26 #identifier { 27 color: red 28 } /* Defines class to align text to the right */ right { 30 text-align: right 31 } /* Defines universal element formatting styles */ 34 * { 35 color: #333333; 36font-family: arial; 37font-size: 10pt 38 }