1 / 71

HTML5 & CSS3

HTML5 & CSS3. A Practical Guide To. HTML5. New Elements Forms Semantics Javascript. CSS3. Selectors Properties Fonts. WHATWG TF?. WHYHTML5?. XHTML Head. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

gale
Download Presentation

HTML5 & CSS3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTML5 & CSS3 • A Practical Guide To

  2. HTML5 • New Elements • Forms • Semantics • Javascript

  3. CSS3 • Selectors • Properties • Fonts

  4. WHATWG TF?

  5. WHYHTML5?

  6. XHTML Head • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" • "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> • <html xmlns="http://www.w3.org/1999/xhtml"> • <head> • <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> • <link rel="stylesheet" href="" media="screen,projection" type="text/css" /> • <script src="" type="text/javascript"></script> • </head>

  7. HTML5 Head • <!DOCTYPE html> • <html> • <head> • <meta charset="utf-8"> • <link rel="stylesheet" href=""> • <script src=""></script> • </head>

  8. New Elements

  9. <article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>

  10. <article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>

  11. <article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>

  12. <article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>

  13. <header>

  14. <header> • <header> • <h1>Dontcom</h1> • <h2>The home of Darren Wood</h2> • </header>

  15. <footer>

  16. <footer> • <footer> • <p>&copy; Darren Wood 2010</p> • </footer>

  17. <nav>

  18. <nav> • <nav> • <ul> • <li><a href="/">Home</a></li> • <li><a href="/about">About</a></li> • ... • </ul> • </nav>

  19. <aside>

  20. <aside> • <aside> • <h2>Blogroll</h2> • <ul> • <li><a href="#">Keith</a></li> • <li><a href="#">Amber</a></li> • <li><a href="#">Kim</a></li> • </ul> • </aside>

  21. <section>

  22. <section> • <section> •   <h1>Level 1</h1> •   <section> •   <h1>Level 2</h1> •   <section> •     <h1>Level 3</h1> •     </section> •   </section> • </section>

  23. <article>

  24. <article> • <article> • <header> • <h1>Blog Post Title</h1> • <h2>Sub title</h2> • </header> • <p>Synergistically optimize flexible communities • via cross-unit information. Objectively impact • bricks-and-clicks catalysts forchange rather • than reliable.</p> • </article>

  25. <video>

  26. <video> • <video controls poster="poster.jpg" width="320" height="240"> • <source src="video.ogv" /> • <source src="video.m4v" /> • <!–- silverlight/flash embed here --> • </video>

  27. <audio>

  28. <audio> SEE VIDEO

  29. Good Form

  30. type= search email url tel range number date datetime datetime-local time month color

  31. placeholder="enter something here“ Autofocus Required autocomplete="off"

  32. Semantics

  33. The most awesomest thing • <a href="/about"> • <h1>About Us</h1> • <h2>Learn more about what we do</h2> • </a>

  34. Javascript

  35. Drag & Drop dragover dragenter drop dataTransfer

  36. Canvas var canvas = document.getElementById("c"),     context = canvas.getContext("2d"); context.fillRect(10, 20, 200, 100);

  37. Get Elements by Class Name document.getElementsByClassName('test'); document.querySelectorAll('.testClass');

  38. Client/Web Storage localStorage

  39. Offline Application Cache <html manifest="/cache.manifest">

  40. CSS3

  41. Selectors

  42. E[att^=”val”] E[att$=”val”] E[att*=”val”] E:root E:nth-child(n) E:nth-last-child(n) E:nth-of-type(n) CSS3 selectors E:nth-last-of-type(n) E:last-child E:first-of-type E:last-of-type E:only-child E:only-of-type E:empty E:target E:enabled E:disabled E:checked E::selection E:not(s) E ~ F

  43. Substring matching attribute selector div[class^="nav"] { background:#ff0; } div[class$="nav"] { background:#ff0; } div[class*="nav"] { background:#ff0; }

  44. The :nth-child() pseudo-class p:nth-child(3) { color:#f00; } li:nth-child(odd) { color: #eee; } li:nth-child(3n+10) {color: #eee; }

  45. The :last-child pseudo-class li:last-child { border-bottom: 0; }

  46. The :empty pseudo class p:empty { display: none; }

  47. The ::selection pseudo class p::selected { background: #ff9; }

  48. Properties

More Related