unit 5 - cascading style sheets (css) xml - level i basic

9
Unit 5 - Cascading Style Sheets (CSS) www.profburnett.com XML - Level I Basic

Upload: christian-payne

Post on 21-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Unit 5 - Cascading Style Sheets (CSS) www.profburnett.com

XML - Level I Basic

Page 2: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

Unit 5 - Cascading Style Sheets (CSS)

Unit objectives Identify the benefits and limitations of styling

XML documents with CSS, and link an XML document to a style sheet.

Apply simple CSS styles to an XML document.

7/14/2013 2

Page 3: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

Topic A Topic A: CSS and XML Topic B: CSS styles

7/14/2013 3

Page 4: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

Overview of Cascading Style Sheets

CSS specifications control a document’s appearance

Several stages of CSS1, CSS2, and now CSS3 specifications are in development CSS3 is modular

W3C provides a CSS Validation Service at its Web site

7/14/2013 4

Page 5: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

Linking to external style sheets Syntax: Prolog

<?xml-stylesheet type=“text/css”

href=“stylesheetname.css” ?>

7/14/2013 5

Page 6: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

External style sheet reference

7/14/2013 6

Page 7: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

Processing external style sheets File is passed to XML parser which reads the

prolog with the declaration (stylesheetname.css) and retrieves that file

Parser passes data from both files to browser Processes the data and displays the result

7/14/2013 7

Page 8: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

Student Exercise Topic A – CSS & XML A-1: Linking a XML Document to a CSS Style

Sheet

7/14/2013 8

Page 9: Unit 5 - Cascading Style Sheets (CSS)  XML - Level I Basic

Copyright © Carl M. Burnett

Unit summary Learned how to identify the benefits and

limitations of styling XML documents with CSS Learned how to link an XML document to a style

sheet.

7/14/2013 9