138
 W3b Sk1llz 現在 ! Day 2 of 2

W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

Embed Size (px)

Citation preview

Page 1: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 1/138

 

W3b Sk1llz

現在 !Day 2 of 2

Page 2: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 2/138

 

What is the commons?

Page 3: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 3/138

 

Resources that are freely

accessible to any member of a given community.

Page 4: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 4/138

 

Natural resources(air, water, parks)

Page 5: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 5/138

 

Cultural resources(creative works, scientific works, public knowledge)

Page 6: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 6/138

 

What is Copyright?

Page 7: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 7/138

 

Page 8: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 8/138

 

Page 9: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 9/138

 

Page 10: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 10/138

Page 11: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 11/138

 

Page 12: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 12/138

 

Page 13: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 13/138

 

Page 14: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 14/138

 

Copyright grants copyrightowner a bundle of rights.

Page 15: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 15/138

 

If you want to...

then you need to ASK!

Copy/Distribute Publicly Perform Publicly Display Build Upon Digitally Distribute

Page 16: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 16/138

 

CC provides free licenses for 

content (creative works).

Page 17: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 17/138

 All Rights Reserved.

Page 18: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 18/138

 No Rights Reserved.

Page 19: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 19/138

 Some Rights Reserved.

Page 20: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 20/138

 

Page 21: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 21/138

 

Page 22: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 22/138

Page 23: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 23/138

 

Page 24: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 24/138

 

Page 25: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 25/138

 

Page 26: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 26/138

 

46

Page 27: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 27/138

 

http://cn.creativecommons.org/

Page 28: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 28/138

 By preciouskhyatt, http://flickr.com/photos/preciouskhyatt/http://creativecommons.org/licenses/by/2.0

Page 29: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 29/138

 

Page 30: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 30/138

 

Page 31: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 31/138

 

Page 32: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 32/138

 

Page 33: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 33/138

 

http://creativecommons.org/license/by/3.0

Unless otherwise noted, this work is

licensed under a CC Attribution 3.0un orted license.

Page 34: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 34/138

 

Page 35: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 35/138

 

Page 36: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 36/138

 

Page 37: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 37/138

 

Page 38: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 38/138

 

Page 39: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 39/138

Page 40: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 40/138

 

Page 41: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 41/138

 

Page 42: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 42/138

 

Page 43: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 43/138

 

Page 44: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 44/138

Page 45: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 45/138

Page 46: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 46/138

Page 47: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 47/138

 

Page 48: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 48/138

 

?

Page 49: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 49/138

 

Quick Review from Day 1

Page 50: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 50/138

 

XHTML 1.0 is current standard● xhtml 1.0 specification

● All elements lowercase

● Use double-quotes

● All tags close

● Removal of some arcane tags (<blink />)

● Separation of style/css and structure/html

http://www.w3.org/TR/xhtml1/

Page 51: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 51/138

 

Why use standards?● Compliance on multiple operating systems

● Compliance on multiple web browsers

● Accessibility (disabilities)

● Scalable media (from computer to cell phoneto PDA)

● Quality assurance

Page 52: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 52/138

 

HOWTO● Create plain-text file in favorite text editor

 – notepad

Save file with name “index.html”● Open web browser

● Drag your text file into browser window

● Now, make edit, and refresh the browserwindow to see changes.

B i HTML W b

Page 53: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 53/138

 

Basic HTML Webpage

<html>

<head>

<title>Summer</title>

</head>

<h1>Summer Vacation</h1>

<p>My summer vacation was sunny, silly, and far tooshort.</p>

<p>How many days till Christmas?</p></html>

B i HTML W b

Page 54: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 54/138

 

Basic HTML Webpage

<html>

<head>

<title>Summer</title>

</head>

<h1>Summer Vacation</h1>

<p>My summer vacation was sunny, silly, and far tooshort.</p>

<p>How many days till Christmas?</p></html>

Page 55: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 55/138

 

http://rejon.org/wiki/Developing_a_Buzz:Web_Workshop

Page 56: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 56/138

 

Testing: Validationhttp://validator.w3.org/

Valid Basic Webpage

Page 57: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 57/138

 

Valid Basic Webpage<!DOCTYPE html

PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title>Jon Phillips</title>

</head>

<body>

<!-- menu start -->

<p><a href="about.html">about</a> :

<a href="http://www.rejon.org/">rejon.org</a> :

<a href="projects/index.html">projects</a>

</p>

<!-- menu stop -->

<h1>bio</h1>

<p><b>Jon Phillips</b> (www.rejon.org) is an open source developer, artist, writer, educator, lecturer, and curator with 12+ years of experience creating communities and working within computing culture. His involvements with

mixing culture and software development have been shown internationally at the Desktop Developers Conference (2005), SFMoMA (2004), University of Tokyo (2004), Korea's KAIST (2004), UCLA Hammer Museum'sDigital Storytelling Conference, UC-Berkeley's 040404 Conference (2004), USC Aim Festival IV (2003), and the ICA London (2002). He is a core Open Source developer advocate and developer on Inkscape(http://www.inkscape.org), a scalable vector graphics editor and on the Open Clip Art Library (http://openclipart.org), and is writing/producing a book, "CVS: Concurrency, Versioning and Systems." Currently, he is visitingfaculty at the San Francisco Art Institute (www.sfai.edu) in the Design+Technology department and is an Open Source developer for the Creative Commons (www.creativecommons.org).</p>

<!-- footer start -->

<p><a href="mailto:[email protected]">email</a></p>

<!-- footer stop -->

</body>

</html> http://rejon.org/wiki/Developing_a_Buzz:Web_Workshop#Valid_Basic_Page

Page 58: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 58/138

 

LASTCLASS

Page 59: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 59/138

 

Create your own webpage with

personal profile and with all your class work on it (linked to it)

Page 60: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 60/138

 

Your Page MUST Validate:http://validator.w3.org/

Page 61: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 61/138

 

Work in groups of 4-5 ppl. to make

a simple group page with links togroup member pages

Page 62: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 62/138

 

TEACHING: Styling your Pages

Page 63: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 63/138

 

Day 2: Web Design (CSS)

Page 64: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 64/138

 

What are Stylesheets?

Page 65: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 65/138

 

"In computing, Cascading Style Sheets (CSS) is astylesheet language used to describe the presentation of a document written in a markup language. Its most

common application is to style web pages written inHTML and XHTML, but the language can be applied toany kind of XML document, including SVG and XUL. TheCSS specifications are maintained by the World WideWeb Consortium (W3C)."

http://en.wikipedia.org/wiki/Cascading_Style_Sheets

Page 66: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 66/138

 

What is possible?http://www.csszengarden.com/

http://en.wikipedia.org/wiki/Cascading_Style_Sheets#External_li

Page 67: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 67/138

 

Current CSS Spec is 2.1http://www.w3.org/Style/CSS/

http://www.w3.org/TR/CSS1

http://www.w3.org/TR/CSS2/

http://www.w3.org/TR/CSS21/

Page 68: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 68/138

 

BasicsA style sheet consists of a list of rules. Each rule

consists of a selector and a declaration block.A declaration-block consists of a list of 

semicolon-separated declarations in curlybraces. Each declaration itself consists of aproperty, a colon (:) then a value.

Page 69: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 69/138

 

IN CSS

body {background-color: red;

}

In a new file, default.css:

Page 70: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 70/138

 

Elements are styled through

selectors. Examples:

Page 71: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 71/138

 

All elementsthat is, using the * selector

Page 72: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 72/138

 

By element namee.g. for all p or h2 elements

Page 73: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 73/138

 

Descendentse.g. for a elements that are descendants of li

elements (e.g links inside lists) the selector isli a

Page 74: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 74/138

 

class or id attributes (from html)e.g. .class and/or #id for elements with:

class="some_class"

id="some_id"

Page 75: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 75/138

 

Adjacent elementse.g. for all p elements preceded by h2

elements, the selector would be h2 + p

Page 76: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 76/138

 

Direct child elemente.g. for all span elements inside p, but no span

elements deeper within the hierarchy, theselector would be p > span

Page 77: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 77/138

 

By attributee.g. for all <input type="text"> the selector

would be input[type="text"]

Page 78: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 78/138

 

In addition to these, a set of pseudo-classes can be usedto define further behavior. Probably the best-known of these is :hover, which applies a style only when the user 'points to' the visible element, usually by holding the

mouse cursor over it. It is appended to a selector as ina:hover or #elementid:hover. Other pseudo-classes andpseudo-elements are, for example, :first-line, :visited or :before. A special pseudo-class is :lang(c), where thestyle would be applied on an element only if it is inlanguage "c".

IN CSSp {

Page 79: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 79/138

 

p {font-family: "Garamond", serif;

}h2 {

font-size: 110%;color: red;background: white;

}.note {

color: red;background: yellow;font-weight: bold;

}p#paragraph1 {

margin: 0;}a:hover {

text-decoration: none;}

Examples inspired by http://en.wikipedia.org/wiki/Cascading_Style_Sheets

Page 80: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 80/138

 

REMEMBERhttp://webmonkey.com/webmonkey/reference/stylesheet_guide/units.html

http://www.ilovejackdaniels.com/css/box-model/

Page 81: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 81/138

 

Classes are an attribute that maybe used however many times youwant. It is a blueprint for creating

many different styles.IN HTML

<p class="note">This paragraph will be renderedin red and bold, with a yellowbackground.</p>

Page 82: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 82/138

 

IN CSS

p.note {

color: red;

font-weight: bold;background: yellow;

}

Page 83: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 83/138

 

IDs are meant to be used only onceon a page, however, due to HTMLglitches, you may use just like

classes. Try to use only once per page though.

IN HTML

<p id="note">This paragraph will be rendered inred and bold, with a yellow background.</p>

Page 84: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 84/138

 

IN CSS

p#note {

color: red;

font-weight: bold;

background: yellow;

}

Page 85: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 85/138

 

HOWTO Connect CSS with HTML

Page 86: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 86/138

 

Inline you would include stylesheets

inside the tags as an attribute.IN HTML

<p style="color: red">Hello this is a red

paragraph.</p>

Page 87: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 87/138

 

Why is this not correct?

Page 88: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 88/138

 

Global Embedded

IN HTML

Page 89: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 89/138

 

IN HTML

<html><head><title>Title</title>

<style type="text/css"><!--[STYLE INFORMATION GOES HERE]

--></style>

</head>

<body>[DOCUMENT BODY GOES HERE]</body></html>

Page 90: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 90/138

 

Why is this not correct?

Page 91: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 91/138

 

Linked (preferred)

IN HTML

<link rel="stylesheet" href="example.css"type="text/css" />

Page 92: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 92/138

 

Linking Example 2 (not all browsers)

IN HTML

<style type="text/css">

@import "example.css";</style>

Page 93: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 93/138

 

InheritanceIn cases where local, global, and linked style definitionsconflict, the most specific stylesheet will generally take

precedence: local overrides global, global overrideslinked. Similarly, inline style attributes override ID, IDoverrides class, and class overrides stylesheet-definedHTML elements. (Hence the concept of cascadingstylesheets)

Page 94: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 94/138

 

CSS Comments

IN CSS

body {

background: yellow;

padding: 4px;

/* border: 1px solid black; */

}

/* This is a comment and is not visible */

Page 95: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 95/138

 

Referencehttp://en.wikipedia.org/wiki/Cascading_Style_Sheets#Reference

http://jigsaw.w3.org/css-validator/

Page 96: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 96/138

 

http://rejon.org/wiki/Developing_a_Buzz:Web_Workshop

Page 97: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 97/138

 

READY FOR NEXT LEVEL?

Page 98: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 98/138

 

What is the difference between

HTML tag and CSS selector formats?

Page 99: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 99/138

 

HTML tag format<a href="http://www.rejon.org/" class="myclass"name="My Link" />

Page 100: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 100/138

 

CSS selector formata.myclass {

color: blue;

background: red;

padding: 8px;}

Page 101: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 101/138

 

CSS: Different DISPLAY Modes

Page 102: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 102/138

 

INLINEDoes not break the current line.EXAMPLES: <b />, <i />, <span />

Page 103: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 103/138

 

BLOCKIs a block that breaks a lineEXAMPLES: <p />, <h1..h* />, <div />,<blockquote />

Page 104: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 104/138

 

DIVDIV stands for block level division.It is generic.DIVs are used in modern web design to createthe overall look and feel of a page.

Page 105: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 105/138

 

Div Example<div>

<!-- put whatever you want here -->

</div>

Page 106: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 106/138

 

Div Example CSSdiv {

padding: 2%;

background-color: red;

width: 20%;

}

Page 107: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 107/138

 

Div Example 2 HTML<div id="sidebar">

<p>This is my sidebar.</p>

</div>

Page 108: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 108/138

 

Div Example 2 CSSdiv#sidebar {

float: right;

padding: 2%;

background-color: #ccc;

width: 25%;

}

Page 109: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 109/138

 

BOX MODELBox model is a way of understanding how block

level elements styling works as a block.http://www.redmelon.net/tstme/box_model/http://www.w3.org/TR/REC-CSS2/box.html#box

http://www.hicksdesign.co.uk/boxmodel/GO THROUGH THIS!!!http://www.w3.org/TR/REC-CSS2/box.html

Page 110: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 110/138

 

Box HTML Example<div id="box">

hello friends

</div>

Page 111: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 111/138

 

Box CSS Examplediv#box {

width: 100px;

border: 1px solid #900;

padding: 10px;margin: 10px;

background: #fee;

}

Page 112: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 112/138

 

<span>...</span>This is used inline (like in paragraph)May be used to specify style inline

Page 113: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 113/138

 

Span Example<p><span class="alert">NEW UPDATE</span>: Thisis a new item.</p>

Page 114: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 114/138

Page 115: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 115/138

 

LISTS: Unordered List<ul>

<li>item one</li>

<li>item two</li>

<li>item three</li></ul>

Page 116: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 116/138

 

Unordered Lists CSSul {

padding: 8px;

background: #eeeeee;

}

Page 117: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 117/138

 

LISTS: Ordered List<ol>

<li>item one</li>

<li>item two</li>

<li>item three</li>

</ol>

Page 118: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 118/138

Page 119: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 119/138

 

List Exampleshttp://www.w3schools.com/css/css_list.aspNO DECORATIONS in CSS use:

− list-style-type: none;

Page 120: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 120/138

 

<img /><img src="myimage.jpg" alt="Text here in case image not loading"name="Text for mouse when over image" class="myimage" />

Page 121: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 121/138

 

CLASS EXAMPLE: We are designing a

page with one big main section, aheader, and sidebar.

Page 122: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 122/138

 

Table-less Page Example

<html>

<head>

<title>hello</title>

</head>

<body>

<div id="header">

Page 123: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 123/138

 

This is the header. Maybe good to put your title here and menu.

</div>

<div id="main">

This is where your main page section goes.

</div>

<div id="sidebar">

This is where possibly quick information, a menu, etc, might go.

</div>

</body>

</html>

Page 124: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 124/138

 

Example CSS

html {

margin: 0;

padding: 0;

}

#header {

width: 100%;background-color: blue;

color: white;

}

Page 125: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 125/138

Example CSS Version 2

Page 126: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 126/138

 

p

html {

margin: 0;

padding: 0;

}

#header {

width: 100%;

background-color: blue;color: white;

padding: 2%;

}

#main {

width: 80%;

Page 127: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 127/138

 

float: left;

background-color: #eee;padding: 2%;

border: 1px dotted black;

}

#sidebar {

width: 20%;

float: left;background-color: #ccc;

padding: 2%;

}

Page 128: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 128/138

 

Designing Websites (reJon-Stylee)

Page 129: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 129/138

Page 130: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 130/138

 

Make Proposal/Contract with ClientBe Specific as to what you are doing for them!

Page 131: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 131/138

 

Develop Concept Sketches

Make Mockups in Favorite

Page 132: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 132/138

 

Make Mockups in Favorite

Professional WayIllustrator, Inkscape (http://www.inkscape.org/), Photoshop

Why use Illustration program compared to photo-editing app?

2:1 rule (about window size)

Minimum: 600 px width by 300 px height

Compression/Expansion: How will page compress and expand?

Navigation

Standard Navigation (unless really good idea to change)

Think in terms of sections/boxes (general): Header, menu, body,sidebar, footer

Page 133: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 133/138

 

Slice and Dice: Create

CSS+XHTML to match mockupUse text editor, browser and image editor

Page 134: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 134/138

 

TestAll Browsers (Internet Explorer, Mozilla, on bothMac/PC)

Validation/Compliance

Page 135: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 135/138

Page 136: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 136/138

 

If everything fine, then done,

otherwise...

Page 137: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 137/138

 

Revise the site and go back to "Slice

and Dice step" and continue...

Page 138: W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

8/14/2019 W3b Sk1llz Zhongshan University Day 2: Creative Commons and Stylesheets

http://slidepdf.com/reader/full/w3b-sk1llz-zhongshan-university-day-2-creative-commons-and-stylesheets 138/138