Lesson 1 HTML CSS Page Layout Foundational markup

  • Slides: 21
Download presentation
Lesson 1 HTML & CSS Page Layout

Lesson 1 HTML & CSS Page Layout

» Foundational markup of all webpages » Two patterns worth learning » HTML 5

» Foundational markup of all webpages » Two patterns worth learning » HTML 5 semantic elements Key Topics

<!doctype html> <head> </head> <body> </html> Foundation

<!doctype html> <head> </head> <body> </html> Foundation

<!doctype html> <head> <title></title> <link rel="stylesheet" type="text/css" href=“style. css"> </head> <body> <!-- LAYOUT &

<!doctype html> <head> <title></title> <link rel="stylesheet" type="text/css" href=“style. css"> </head> <body> <!-- LAYOUT & CONTENT HERE --> </body> </html> Foundation

BODY DIV (e. g. , WRAPPER or CONTAINER) HEADER NAV ASIDE CONTENT FOOTER Layout

BODY DIV (e. g. , WRAPPER or CONTAINER) HEADER NAV ASIDE CONTENT FOOTER Layout

HTML elements describe content <tag>content</tag> <tag attribute=“value”> <div class=“attention”>HTML is <strong>FUN!</strong></div> Patterns

HTML elements describe content <tag>content</tag> <tag attribute=“value”> <div class=“attention”>HTML is <strong>FUN!</strong></div> Patterns

HTML elements describe content container elements – hold content <opening tag attribute= “value”> Content

HTML elements describe content container elements – hold content <opening tag attribute= “value”> Content Here</closing tag> <h 1>…</h 1> <p>…</p> <a href=“www. site. com”>…</a> Patterns

HTML elements describe content container elements – hold content <opening tag attribute= “value”> Content

HTML elements describe content container elements – hold content <opening tag attribute= “value”> Content Here</closing tag> empty elements – hold no content <tag attribute= “value”> <img src=“images/apple. gif” alt=“Logo” > Patterns

HTML elements describe content container elements – hold content <opening tag attribute= “value”> Content

HTML elements describe content container elements – hold content <opening tag attribute= “value”> Content Here</closing tag> empty elements – hold no content <tag attribute= “value”> comments <!-- Comment Here --> Patterns

HTML elements describe content <tag>content</tag> <tag attribute=“value”> CSS declarations display content selector { property:

HTML elements describe content <tag>content</tag> <tag attribute=“value”> CSS declarations display content selector { property: value; } Patterns

CSS declarations display content body { font: 100%/1. 4 Verdana, Arial, Helvetica, sans-serif; background-color:

CSS declarations display content body { font: 100%/1. 4 Verdana, Arial, Helvetica, sans-serif; background-color: #f 66; margin: 0; padding: 0; color: #000; /* black font color */ } Patterns

CSS declarations display content html tag selector { property: value; } class selector {

CSS declarations display content html tag selector { property: value; } class selector { property: value; } id selector #selector { property: value; } Patterns

CSS declarations display content #wrapper { margin: 0 auto; width: 960 px; background: #eee;

CSS declarations display content #wrapper { margin: 0 auto; width: 960 px; background: #eee; /* same as aside */ text-align: left; }. attention { } Patterns

CSS declarations display content html tag selector { property: value; } class selector {

CSS declarations display content html tag selector { property: value; } class selector { property: value; } id selector #selector { property: value; } pseudo-class selector: pseudo-class { property: value; } Patterns

CSS declarations display content a: link { color: #f 00; } a: visited {

CSS declarations display content a: link { color: #f 00; } a: visited { color: #0 f 0; } a: hover, a: active { color: #00 f; } Patterns

References » » » » » w 3 schools. com html 5 doctor. com

References » » » » » w 3 schools. com html 5 doctor. com w 3. org csszengarden. com visibone. com htmlgoodies. com javascriptkit. com dynamicdrive. com github. com Platforms » » » » » Look It Up Notepad Coffee. Cup Bluefish. Open. Office Word. Press Drupal Joomla! Dot. Net. Nuke Dreamweaver / Edge Share. Point / O 365

HTML 5 has new semantic elements <header> <figure> <nav> <figcaption> <section> <details> <article> <summary>

HTML 5 has new semantic elements <header> <figure> <nav> <figcaption> <section> <details> <article> <summary> <aside> <mark> <footer> <time> Semantics

HTML 5 has new semantic elements ? <header> <figure> <nav> <figcaption> <section> <details> <article>

HTML 5 has new semantic elements ? <header> <figure> <nav> <figcaption> <section> <details> <article> <summary> <aside> <mark> <footer> <time> Semantics

Think of a newspaper » The paper comes in sections… sports, real estate, home

Think of a newspaper » The paper comes in sections… sports, real estate, home & garden, etc. » Each sections has articles » Some articles are divided into sections – Estelle Weyl’s analogy Sections & Articles

DIVs are non-semantic elements » Style content » Structure webpages » Contain unrelated content

DIVs are non-semantic elements » Style content » Structure webpages » Contain unrelated content <div id=“wrapper”> Content Here </div> Div Tags

» HTML and CSS use memorable patterns » Code can be easily discovered »

» HTML and CSS use memorable patterns » Code can be easily discovered » Semantic tagging describes meaning Key Takeaways