lecture 34 week9B

lecture 34 week9B - Unix C + GNU HTML Perl Python CSS...

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

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 1 CSS Comp-206 : Introduction to Software Systems Week 9B Joseph Vybihal Computer Science McGill University
Background image of page 1

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

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 2 Announcements Course Evaluations online
Background image of page 2
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 3 Part 1 CSS
Background image of page 3

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

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 4 CSS CSS stands for Cascading Style Sheets . Styles define how to display HTML elements. Styles were added to HTML 4.0 to solve a problem A centralized and uniform way to define the style of a website. Styles are saved in an external file (.css). Style can be shared by several pages. The introduction to CSS is based on the W3C tutorial http://www.w3schools.com/css/css_intro.asp
Background image of page 4
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 5 CSS syntax A CSS rule is composed of three elements: a selector, properties and values. selector {property: value} The selector is normally the HTML element/tag you wish to define. The property is the attribute you wish to change Each property can take a value. For example, the following rule will draw the body of your document black. body {color: black} If a value has multiple words, the value should be quoted. p {font-family: "sans serif"} Multiple properties can be defined in a particular rule. p {text-align:center;color:red}
Background image of page 5

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

View Full DocumentRight Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 6 Grouping You can group selectors : h1,h2,h3,h4,h5,h6 { color: green }
Background image of page 6
C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 7 Specific Classes With the class selector you can define different styles for the same type of HTML element. p.right {text-align: right} p.centre {text-align: centre} You have to use the class attribute in your HTML document: <p class="right"> This paragraph will be right-aligned. </p> <p class="centre"> This paragraph will be centre-aligned. </p>
Background image of page 7

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

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

This document was uploaded on 01/30/2011.

Page1 / 24

lecture 34 week9B - Unix C + GNU HTML Perl Python CSS...

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

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