Slide 1

Slide 1 text

Wednesday, September 19, 12

Slide 2

Slide 2 text

What is HTML? What is CSS? Wikipedia: The purpose of a web browser is to read HTML documents and compose them into visual or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page. Web browsers can also refer to Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both the HTML and the CSS standards, encourages the use of CSS over explicitly presentational HTML markup. It primarily exists to separate the content from the presentation. Better question: What is HTML for? Wednesday, September 19, 12

Slide 3

Slide 3 text

Anatomy of HTML Elements Google Content Wednesday, September 19, 12

Slide 4

Slide 4 text

Anatomy of an HTML file • Elements (or tags)

My paragraph.

• Attributes click here Simple Title Google Wednesday, September 19, 12

Slide 5

Slide 5 text

p { color: red; } Simple Title Google How to use a CSS file index.html stylesheet.css HTML CSS Wednesday, September 19, 12

Slide 6

Slide 6 text

This is an HTML paragraph.

Welcome!

HTML in action p { color: blue; font-weight: bold; } h1 { background: gray; } CSS in action Wednesday, September 19, 12

Slide 7

Slide 7 text

HTML CSS defines the structure defines the appearance HyperText Markup Language Cascading Style Sheets what is presented how it’s presented -VS- this is a paragraph all paragraphs are red Wednesday, September 19, 12

Slide 8

Slide 8 text

Old and Busted New Hotness Types of Markup Structural markup only! HTML HTML Not much Handles all presentation code CSS CSS • Structural

• Presentational

o hai

Methodologies Wednesday, September 19, 12

Slide 9

Slide 9 text

Why does this matter? • Looks nasty • Hard to maintain • Repetitive Old • Compatibility • Organization • Reusability New old_html.html new_html.html new_stylesheet.css Structural and presentational markup together Structural Presentational

o hai

o hai

p { color: red; } Wednesday, September 19, 12

Slide 10

Slide 10 text

Why does it matter?

Never gonna give you up,

Never gonna let you down,

Never gonna run around and desert you.

Never gonna make you cry,

Never gonna say goodbye,

Never gonna tell a lie and hurt you.

p { color: ; } Never gonna give you up, Never gonna let you down, Never gonna run around and desert you. Never gonna make you cry, Never gonna say goodbye, Never gonna tell a lie and hurt you. output red blue Never gonna give you up, Never gonna let you down, Never gonna run around and desert you. Never gonna make you cry, Never gonna say goodbye, Never gonna tell a lie and hurt you. output Wednesday, September 19, 12

Slide 11

Slide 11 text

HTML Tags Doctype: Strict, Traditional, Frameset Wednesday, September 19, 12

Slide 12

Slide 12 text

CSS Properties CSS 1 or CSS 2 Wednesday, September 19, 12

Slide 13

Slide 13 text

Hello World!

Just saying hi.

! DOCTYPE Wednesday, September 19, 12

Slide 14

Slide 14 text

"OJOTUSVDUJPOUIBUBTTPDJBUFTBQBSUJDVMBS4(.-PS9.-EPDVNFOU GPSFYBNQMF BXFCQBHF XJUIB%PDVNFOU5ZQF%FpOJUJPO %5%  GPS FYBNQMF UIFGPSNBMEFpOJUJPOPGBQBSUJDVMBSWFSTJPOPG)5.-  doc•type dec•la•ra•tion noun c㷦EÅLU⒒Q㷧EFLMⓒ㷦S⒑TIⓒOc "OJOTUSVDUJPOUIBUBTTPDJBUFTBQBSUJDVMBS4(.-PS9.-EPDVNFOU GPSFYBNQMF BXFCQBHF XJUIB%PDVNFOU5ZQF%FpOJUJPO %5%  GPS FYBNQMF UIFGPSNBMEFpOJUJPOPGBQBSUJDVMBSWFSTJPOPG)5.-  (or Doctype) markup languages HTML v4.01, HTML v5, XHTML 1.1, etc Wednesday, September 19, 12

Slide 15

Slide 15 text

Doctypes tell your browser how to render your code. Wednesday, September 19, 12

Slide 16

Slide 16 text

HTML 4.01 DOCTYPES HTML5 DOCTYPE LAME! Wednesday, September 19, 12

Slide 17

Slide 17 text

HTML 4.01 Strict Doctype Wednesday, September 19, 12

Slide 18

Slide 18 text

So, why use a doctype? Using a doctype ensures maximum compatibility across browsers. Think of a doctype as a set of rules by which all browsers must play. Q: A: Wednesday, September 19, 12

Slide 19

Slide 19 text

Wednesday, September 19, 12

Slide 20

Slide 20 text

Wednesday, September 19, 12

Slide 21

Slide 21 text

Thank you! Ryan L. Cross Cylence, Inc. (cylence.com) Twitter: @slant, @cylenceinc Upcoming Enclave Discussions May iOS June UX July jQuery August Photoshop enclavecoop.com/discussions Wednesday, September 19, 12