Tutorial.05

Tutorial.05 - TUTORIAL 5 XP WORKING WITH CASCADING STYLE...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
New Perspectives on XML, 2nd Edition Tutorial 5 1 XP TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
New Perspectives on XML, 2nd Edition Tutorial 5 2 XP OBJECTIVES In this chapter, you will: Learn about the history and theory of Cascading Style Sheets Link a style sheet to an XML document Design a page layout using styles
Background image of page 2
New Perspectives on XML, 2nd Edition Tutorial 5 3 XP OBJECTIVES In this chapter, you will: Apply styles to text and text backgrounds Use a style sheet to create and display background images Use styles with elements classified by id and class attributes
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
New Perspectives on XML, 2nd Edition Tutorial 5 4 XP EXPLORING THE HISTORY OF CSS A style is a rule that defines the appearance of a particular element in a document The collection of styles for all elements in a document is called a style sheet The accepted style sheet standard is Cascading Style Sheets, or CSS CSS was developed by the World Wide Web Consortium
Background image of page 4
New Perspectives on XML, 2nd Edition Tutorial 5 5 XP EXPLORING THE HISTORY OF CSS The first CSS standard, CSS1, was released in 1996,and established basic styles used in CSS CSS2 was released in 1998, and added support for printers, sound devices, downloadable forms, layout, and tables CSS2.1 introduced in April 2002 CSS3 plans to modularize the CSS standard, and increase support for non-Western languages and XML namespaces
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
New Perspectives on XML, 2nd Edition Tutorial 5 6 XP ATTACHING A STYLE SHEET TO AN XML DOCUMENT To attach a style sheet to an XML document, the processing instruction should be inserted directly below the first line in the XML file, which specifies the name and location of files containing the style sheet: <?xml-stylesheet type=“text/css” href=“url” ?>
Background image of page 6
New Perspectives on XML, 2nd Edition Tutorial 5 7 XP WORKING WITH SELECTORS Each line of the CSS file attaches a collection of styles to an element or group of elements called a selector For each selector, the CSS style attributes should be specified, and the values are applied to those attributes Style attributes are passed from parent elements to the descendant elements
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
New Perspectives on XML, 2nd Edition Tutorial 5 8 XP WORKING WITH SELECTORS
Background image of page 8
New Perspectives on XML, 2nd Edition Tutorial 5 9 XP WORKING WITH THE DISPLAY STYLE An XML document contains information in distinct sections called blocks, or block-level elements Without styles the browser displays the content of each XML element inline, as a continuous text string To display an element’s content inline in a separate block, the style is: display: block To hide an element’s content, the style is: display: none
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
New Perspectives on XML, 2nd Edition Tutorial 5 10 XP WORKING WITH THE DISPLAY STYLE
Background image of page 10
New Perspectives on XML, 2nd Edition Tutorial 5 11 XP WORKING WITH LIST-ITEMS To display an element as a list, the style is: display: list-item To control the appearance of the markers in the list,
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/26/2010 for the course CS 178 taught by Professor Mandyam during the Spring '10 term at Ohlone.

Page1 / 48

Tutorial.05 - TUTORIAL 5 XP WORKING WITH CASCADING STYLE...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online