SlideShare a Scribd company logo
Easing Into
                   HTML5 and CSS3
                               Brian Moon
                              dealnews.com
Who attended the
HTML5 and Javascript
                              @brianlmoon
tutorial yesterday?    http://brian.moonspot.net/
What is in HTML5?
• New Semantic Tags
 • <article>, <header>, <footer>, etc.
• New Multimedia Tags
 • <canvas>, <video>, <audio>, etc.
• New Javascript APIs
• data- attributes
• HTML5 Forms
What is in CSS3?

• New Properties
• New Selectors
• Device dependent Media Queries
What is not
   HTML5 nor CSS3?

• SVG - been around, browsers just got
  better
• Geo-Location - Separate W3C spec from
  HTML5
Who uses your site?

• Are the tech savvy?
• Are they sensitive to change?
• Are they in China? (Lots of IE6 still)
• All Mobile?
dealnews browsers
IE6 0.30%
IE7 4.19%
IE8 11.91%
             22%
                                           IE9+
                                           FF3.5+
                                           Chrome
                                           Safari
                                     78%
                                           3.1+


                   Modern Browsers
                   Other
Our design goals

• Identical UI and UX on modern browsers
• Fully functional and usable on IE8, IE7 and
  Opera
• Page should render and users should be
  able to click things in IE6
First Step



All browsers process pages with
this doctype in standards mode.
http://blogs.msdn.com/b/jennifer/archive/2011/08/01/html5-part-1-semantic-markup-and-page-layout.aspx




<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
                           Semantic Tags
</head>
<body>
    <header>
        <hgroup>
             <h1>Header in h1</h1>
             <h2>Subheader in h2</h2>
        </hgroup>
    </header>
    <nav>
        <ul>
             <li><a href="#">Menu Option 1</a></li>
             <li><a href="#">Menu Option 2</a></li>
             <li><a href="#">Menu Option 3</a></li>
        </ul>
    </nav>
    <section>
        <article>
             <header>
                 <h1>Article #1</h1>
             </header>
             <section>
                 This is the first article. This is <mark>highlighted</mark>.
             </section>
        </article>
        <article>
             <header>
                 <h1>Article #2</h1>
             </header>
             <section>
                 This is the second article. These articles could be blog posts, etc.
             </section>
        </article>
    </section>
Semantic Tags
• Older browsers don’t treat these as block
  elements
• CSS can fix it in some browsers
• Javascript (HTML Shiv) required in older IE
  versions
• Good semantic HTML4 markup and
  Microformats already recognized by scrapers
• Would use in new projects.YMMV on ROI for
  converting well done HTML
data attributes problem


• Unknown attributes are ignored by
  browsers, but the pages don’t validate.
• Hacks exist where classes are used
  (e.g. class=”artid-574244”)
data- attributes
<div class="art body" data-artid="574244">

   • Allows you to store data as an attribute
     that is ignored by the browser
   • Any attribute prefixed with data- is ignored
     by the browser (as all unknown attributes
     are) and are treated as valid HTML5.
   • Use element.getAttribute(“data-artid”); to
     get the data
   • Use it now. Works in all browsers.
Video & Audio
• Well documented licensing war
• Great idea, caught up in licensing issues
• May have to store your media in more than
  one format
• Javascript libraries exist to help with
  fallback
• Have used it via JS libs. Eases the pain. Falls
  back to Flash.
Canvas
• Graphics via markup/JS
• Not generally lighter weight than images, so
  not a replacement for static images
• Great for graphs and such
• Many, many javascript libraries to help build
  graphs via Canvas.
• Used for internal reporting where we
  dictate browser versions. Publicly,YMMV.
          Wanna waste time? http://canvasrider.com/
New JS APIs

• Web Performance - neat
• Local Storage - requires user prompt
• Web Workers (IE10)
• Web Sockets - very new, has issues
• You really need a good use case for these
HTML5 Forms
<input name=”email” type=”email”>

<input name=”url” type=”url”>

<input name=”name” type=”text” required>

<input name=”search” type=”text”
placeholder=”Search”>
HTML5 Forms
• Reduce custom validation Javascript
• You can query if a field is valid with
  checkValidity().
• Custom validation possible via event
  handlers
• Requires IE10 =(
• Some javascript libs can close the gap.
CSS3
Eye Candy
• border-radius (i.e. rounded corners)
• box-shadow
• gradient backgrounds
• multiple backgrounds
• transforms
• transitions
Use with fallback
• border-radius
• box-shadow
• gradient backgrounds
• multiple backgrounds
• Make sure the design holds up to your
  standard on browsers that don’t support
  these
Example

FF12




IE8
Example 2

 IE9   FF12




 IE7    IE8
Gnarly CSS
.cta {
    display: inline-block;
    vertical-align: bottom;
    -webkit-box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.5);
    -moz-box-shadow:    1px 1px 2px 0px rgba(0,0,0,0.5);
    box-shadow:         1px 1px 2px 0px rgba(0,0,0,0.5);
    border-width: 0px;
    border-style: none;
    border-color: rgba(0,0,0,0);
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;

    /* The is for the most commonly used design */
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    padding: 0 12px;
    font: bold 12px arial,helvetica,clean,sans-serif;
    line-height: 20px;
    color: white;
    background: #6ecb12; /* Old browsers */
    background: -moz-linear-gradient(top, rgba(118,215,24,1) 19%, rgba(88,168,11,1) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(19%,rgba(118,215,24,1)),
                                        color-stop(100%,rgba(88,168,11,1))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, rgba(118,215,24,1) 19%,
                                        rgba(88,168,11,1) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, rgba(118,215,24,1) 19%,rgba(88,168,11,1) 100%); /* Opera11.10+ */
    background: -ms-linear-gradient(top, rgba(118,215,24,1) 19%,rgba(88,168,11,1) 100%); /* IE10+ */
    background: linear-gradient(top, rgba(118,215,24,1) 19%,rgba(88,168,11,1) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#76d718',
                                      endColorstr='#58a80b',GradientType=0 ); /* IE6-9 */
}
CSS3 Tools

• http://css3generator.com/
• http://border-radius.com/
• http://www.colorzilla.com/gradient-editor/
Transitions
• Replaces javascript for some types of
  animations
• CSS language to define how an element
  changes from one state to another
• Should be treated as optional and have a fall
  back or the page should work without
  them
• Can be taxing on the browser
Transitions
#delay1 {  
  position: relative;  
  transition-property: font-size;  
  transition-duration: 4s;  
  transition-delay: 2s;  
  font-size: 14px;  
}  
  
#delay1:hover {  
  transition-property: font-size;  
  transition-duration: 4s;  
  transition-delay: 2s;  
  font-size: 36px;  
}  
Transforms
• CSS language for scaling and rotating
  elements
• Mixed with transistions, animation can be
  achieved.
• May require browser specific tweaking or
  even non-standard CSS for IE.
• Can confuse the box model and page flow
Example
          The labels are
          rotated 90
          degrees, but as
          you can see,
          Firebug things
          the element is in
          a different place
          than where it
          appears when
          drawn.
Transforms
.accordion .panel-label {
    -moz-transform-origin: 100% 0;
    -moz-transform: rotate(-90deg);
    -webkit-transform-origin: 100% 0;
    -webkit-transform: rotate(-90deg);
    -o-transform-origin: 100% 0;
    -o-transform: rotate(-90deg);
    transform-origin: 100% 0;
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    white-space:nowrap;
    text-align: right;

    /* MSIE < 10 */
    filter:
progid:DXImageTransform.Microsoft.BasicImage(rotation=3)9;
    left: 0px9;

}
Eye Candy Issues

• All of these techniques can be taxing on the
  browser and or device.
• Excessive use of gradients and transforms
  can cause major browser lag
• Many require browser prefixes (-moz or
  -webkit) or IE specific syntax (filter)
Selectors
tr:nth-child(2n+1)   /*   every odd row of an table */
tr:nth-child(odd)    /*   same */
tr:nth-child(2n+0)   /*   every even row of an table */
tr:nth-child(even)   /*   same */

tr:nth-last-child(-n+2) /* the two last rows of an table */

a:first-child /* a is first child of any element */

Also:
:first-of-type
:only-child
:only-of-type
:empty
          Browser performance may suffer using these
            on large, complex documents. Only use
           these when you can’t control the markup.
How Selectors Work
          This is not CSS3, but just general knowledge you need




• CSS is parsed and ALL rules are evaluated.
  More rules, more work for the browser
• Rules are evaluated right to left
• “.foo a” matches ALL a tags in the document
  and walks up the DOM to decide if they
  have a .foo parent.
Media Queries
@media all and (max-width: 699px) and (min-width: 520px),
               (min-width: 1151px) {
  body {
    background: #ccc;
  }
}


   • Allow you to specify different CSS for
      different device specifications
   • You can use these now to help with mobile
      design and usability. Those devices support
      it, older browsers ignore it.
Experiment
                     Firefox



                       IE6




http://brian.moonspot.net/experimenting-with-html5
Conclusion
• Understand your audience
• HTML5 Doctype works for HTML4, try it
• Use HTML5 semantic tags to fix bad HTML
  or on new projects
• Video is not the Flash killer we all hoped
  for. But, it does have its uses.
• HTML5 Forms have great potential, but still
  a nice to have for now.
Conclusion
• CSS3 eye candy is a great extra bit for
  users that can see it. Be sure you are happy
  with the fallback for others.
• New CSS3 selectors are powerful, but
  good markup with classes is still better
• CSS media queries are very helpful for
  formatting your pages on smaller screens
  and are supported on those platforms

More Related Content

What's hot (20)

Continuous delivery with open source tools
Continuous delivery with open source toolsContinuous delivery with open source tools
Continuous delivery with open source tools
Sebastian Helzle
 
Testing Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade WorkflowTesting Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade Workflow
Pantheon
 
Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty Details
Mike Brittain
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
cgack
 
JavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionJavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolution
Bert Jan Schrijver
 
Drupal Performance
Drupal Performance Drupal Performance
Drupal Performance
Pantheon
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas Version
Dave Olsen
 
Continuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two ApproachesContinuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two Approaches
Ross Snyder
 
WTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal projectWTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal project
Symetris
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Michael Lihs
 
How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...
How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...
How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...
DevOpsDays Tel Aviv
 
London Atlassian User Group - February 2014
London Atlassian User Group - February 2014London Atlassian User Group - February 2014
London Atlassian User Group - February 2014
Steve Smith
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
Sonatype
 
Delivery Free of Charge
Delivery Free of ChargeDelivery Free of Charge
Delivery Free of Charge
All Things Open
 
Drupal 8 and Pantheon
Drupal 8 and PantheonDrupal 8 and Pantheon
Drupal 8 and Pantheon
Pantheon
 
Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1
Vishal Biyani
 
Devops at Startup Weekend BXL
Devops at Startup Weekend BXLDevops at Startup Weekend BXL
Devops at Startup Weekend BXL
Kris Buytaert
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
Steve Povilaitis
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
Ganesh Samarthyam
 
Continuous Integration using TFS
Continuous Integration using TFSContinuous Integration using TFS
Continuous Integration using TFS
Mohamed Samy
 
Continuous delivery with open source tools
Continuous delivery with open source toolsContinuous delivery with open source tools
Continuous delivery with open source tools
Sebastian Helzle
 
Testing Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade WorkflowTesting Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade Workflow
Pantheon
 
Continuous Delivery: The Dirty Details
Continuous Delivery: The Dirty DetailsContinuous Delivery: The Dirty Details
Continuous Delivery: The Dirty Details
Mike Brittain
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
cgack
 
JavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionJavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolution
Bert Jan Schrijver
 
Drupal Performance
Drupal Performance Drupal Performance
Drupal Performance
Pantheon
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas Version
Dave Olsen
 
Continuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two ApproachesContinuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two Approaches
Ross Snyder
 
WTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal projectWTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal project
Symetris
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Michael Lihs
 
How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...
How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...
How to survive continuous innovation - Sebastien Goasguen - DevOpsDays Tel Av...
DevOpsDays Tel Aviv
 
London Atlassian User Group - February 2014
London Atlassian User Group - February 2014London Atlassian User Group - February 2014
London Atlassian User Group - February 2014
Steve Smith
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
Sonatype
 
Drupal 8 and Pantheon
Drupal 8 and PantheonDrupal 8 and Pantheon
Drupal 8 and Pantheon
Pantheon
 
Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1
Vishal Biyani
 
Devops at Startup Weekend BXL
Devops at Startup Weekend BXLDevops at Startup Weekend BXL
Devops at Startup Weekend BXL
Kris Buytaert
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
Steve Povilaitis
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
Ganesh Samarthyam
 
Continuous Integration using TFS
Continuous Integration using TFSContinuous Integration using TFS
Continuous Integration using TFS
Mohamed Samy
 

Viewers also liked (8)

Gearmanpresentation 110308165409-phpapp01
Gearmanpresentation 110308165409-phpapp01Gearmanpresentation 110308165409-phpapp01
Gearmanpresentation 110308165409-phpapp01
longtuan
 
Quick Introduction to Gearman
Quick Introduction to GearmanQuick Introduction to Gearman
Quick Introduction to Gearman
Giuseppe Maxia
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
Brian Aker
 
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Bachkoutou Toutou
 
Website review
Website reviewWebsite review
Website review
spg
 
Work Queues
Work QueuesWork Queues
Work Queues
ciconf
 
Scale like a pro with Gearman
Scale like a pro with GearmanScale like a pro with Gearman
Scale like a pro with Gearman
Amal Raghav
 
Gearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applicationsGearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applications
Teamskunkworks
 
Gearmanpresentation 110308165409-phpapp01
Gearmanpresentation 110308165409-phpapp01Gearmanpresentation 110308165409-phpapp01
Gearmanpresentation 110308165409-phpapp01
longtuan
 
Quick Introduction to Gearman
Quick Introduction to GearmanQuick Introduction to Gearman
Quick Introduction to Gearman
Giuseppe Maxia
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
Brian Aker
 
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Kill bottlenecks with gearman, sphinx, and memcached, Confoo 2011
Bachkoutou Toutou
 
Website review
Website reviewWebsite review
Website review
spg
 
Work Queues
Work QueuesWork Queues
Work Queues
ciconf
 
Scale like a pro with Gearman
Scale like a pro with GearmanScale like a pro with Gearman
Scale like a pro with Gearman
Amal Raghav
 
Gearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applicationsGearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applications
Teamskunkworks
 

Similar to Ease into HTML5 and CSS3 (20)

Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
Shoshi Roberts
 
Developing web applications in 2010
Developing web applications in 2010Developing web applications in 2010
Developing web applications in 2010
Ignacio Coloma
 
HTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwordsHTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwords
Mo Jangda
 
Dive Into HTML5
Dive Into HTML5Dive Into HTML5
Dive Into HTML5
Doris Chen
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
Denise Jacobs
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)
Chris Mills
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
Wynn Netherland
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3
Denise Jacobs
 
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
Patrick Lauke
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 
CSS3: Ripe and Ready
CSS3: Ripe and ReadyCSS3: Ripe and Ready
CSS3: Ripe and Ready
Denise Jacobs
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
Denise Jacobs
 
Modern Web Development
Modern Web DevelopmentModern Web Development
Modern Web Development
Robert Nyman
 
Html5
Html5Html5
Html5
Satoshi Kikuchi
 
html5_css3
html5_css3html5_css3
html5_css3
Sindh Madresatul Islam University
 
Mobile and web optimization + Drupal
Mobile and web optimization + DrupalMobile and web optimization + Drupal
Mobile and web optimization + Drupal
Kirill Borzov
 
Modernizr - Detecting HTML5 and CSS3 support
Modernizr - Detecting HTML5 and CSS3 supportModernizr - Detecting HTML5 and CSS3 support
Modernizr - Detecting HTML5 and CSS3 support
Paul Irish
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
Wynn Netherland
 
Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...
Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...
Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...
deveykypri6
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
Shoshi Roberts
 
Developing web applications in 2010
Developing web applications in 2010Developing web applications in 2010
Developing web applications in 2010
Ignacio Coloma
 
HTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwordsHTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwords
Mo Jangda
 
Dive Into HTML5
Dive Into HTML5Dive Into HTML5
Dive Into HTML5
Doris Chen
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)
Chris Mills
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3
Denise Jacobs
 
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
Patrick Lauke
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 
CSS3: Ripe and Ready
CSS3: Ripe and ReadyCSS3: Ripe and Ready
CSS3: Ripe and Ready
Denise Jacobs
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
Denise Jacobs
 
Modern Web Development
Modern Web DevelopmentModern Web Development
Modern Web Development
Robert Nyman
 
Mobile and web optimization + Drupal
Mobile and web optimization + DrupalMobile and web optimization + Drupal
Mobile and web optimization + Drupal
Kirill Borzov
 
Modernizr - Detecting HTML5 and CSS3 support
Modernizr - Detecting HTML5 and CSS3 supportModernizr - Detecting HTML5 and CSS3 support
Modernizr - Detecting HTML5 and CSS3 support
Paul Irish
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
Wynn Netherland
 
Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...
Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...
Full download Responsive Web Design with HTML5 and CSS3 Second Edition Ben Fr...
deveykypri6
 

Recently uploaded (20)

Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Grannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI ExperiencesGrannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI Experiences
Lauren Parr
 
Jeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software DeveloperJeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software Developer
Jeremy Millul
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
Evaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical ContentEvaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical Content
Paul Groth
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyesEnd-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
ThousandEyes
 
Fortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in CybersecurityFortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in Cybersecurity
VICTOR MAESTRE RAMIREZ
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Introducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and ARIntroducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and AR
Safe Software
 
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 ADr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr. Jimmy Schwarzkopf
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptxECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
Jasper Oosterveld
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Let’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack CommunityLet’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack Community
SanjeetMishra29
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Grannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI ExperiencesGrannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI Experiences
Lauren Parr
 
Jeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software DeveloperJeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software Developer
Jeremy Millul
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
Evaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical ContentEvaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical Content
Paul Groth
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyesEnd-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
ThousandEyes
 
Fortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in CybersecurityFortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in Cybersecurity
VICTOR MAESTRE RAMIREZ
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Introducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and ARIntroducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and AR
Safe Software
 
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 ADr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr. Jimmy Schwarzkopf
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptxECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
Jasper Oosterveld
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Let’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack CommunityLet’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack Community
SanjeetMishra29
 

Ease into HTML5 and CSS3

  • 1. Easing Into HTML5 and CSS3 Brian Moon dealnews.com Who attended the HTML5 and Javascript @brianlmoon tutorial yesterday? http://brian.moonspot.net/
  • 2. What is in HTML5? • New Semantic Tags • <article>, <header>, <footer>, etc. • New Multimedia Tags • <canvas>, <video>, <audio>, etc. • New Javascript APIs • data- attributes • HTML5 Forms
  • 3. What is in CSS3? • New Properties • New Selectors • Device dependent Media Queries
  • 4. What is not HTML5 nor CSS3? • SVG - been around, browsers just got better • Geo-Location - Separate W3C spec from HTML5
  • 5. Who uses your site? • Are the tech savvy? • Are they sensitive to change? • Are they in China? (Lots of IE6 still) • All Mobile?
  • 6. dealnews browsers IE6 0.30% IE7 4.19% IE8 11.91% 22% IE9+ FF3.5+ Chrome Safari 78% 3.1+ Modern Browsers Other
  • 7. Our design goals • Identical UI and UX on modern browsers • Fully functional and usable on IE8, IE7 and Opera • Page should render and users should be able to click things in IE6
  • 8. First Step All browsers process pages with this doctype in standards mode.
  • 9. http://blogs.msdn.com/b/jennifer/archive/2011/08/01/html5-part-1-semantic-markup-and-page-layout.aspx <!DOCTYPE html> <html> <head> <title>Title</title> Semantic Tags </head> <body> <header> <hgroup> <h1>Header in h1</h1> <h2>Subheader in h2</h2> </hgroup> </header> <nav> <ul> <li><a href="#">Menu Option 1</a></li> <li><a href="#">Menu Option 2</a></li> <li><a href="#">Menu Option 3</a></li> </ul> </nav> <section> <article> <header> <h1>Article #1</h1> </header> <section> This is the first article. This is <mark>highlighted</mark>. </section> </article> <article> <header> <h1>Article #2</h1> </header> <section> This is the second article. These articles could be blog posts, etc. </section> </article> </section>
  • 10. Semantic Tags • Older browsers don’t treat these as block elements • CSS can fix it in some browsers • Javascript (HTML Shiv) required in older IE versions • Good semantic HTML4 markup and Microformats already recognized by scrapers • Would use in new projects.YMMV on ROI for converting well done HTML
  • 11. data attributes problem • Unknown attributes are ignored by browsers, but the pages don’t validate. • Hacks exist where classes are used (e.g. class=”artid-574244”)
  • 12. data- attributes <div class="art body" data-artid="574244"> • Allows you to store data as an attribute that is ignored by the browser • Any attribute prefixed with data- is ignored by the browser (as all unknown attributes are) and are treated as valid HTML5. • Use element.getAttribute(“data-artid”); to get the data • Use it now. Works in all browsers.
  • 13. Video & Audio • Well documented licensing war • Great idea, caught up in licensing issues • May have to store your media in more than one format • Javascript libraries exist to help with fallback • Have used it via JS libs. Eases the pain. Falls back to Flash.
  • 14. Canvas • Graphics via markup/JS • Not generally lighter weight than images, so not a replacement for static images • Great for graphs and such • Many, many javascript libraries to help build graphs via Canvas. • Used for internal reporting where we dictate browser versions. Publicly,YMMV. Wanna waste time? http://canvasrider.com/
  • 15. New JS APIs • Web Performance - neat • Local Storage - requires user prompt • Web Workers (IE10) • Web Sockets - very new, has issues • You really need a good use case for these
  • 16. HTML5 Forms <input name=”email” type=”email”> <input name=”url” type=”url”> <input name=”name” type=”text” required> <input name=”search” type=”text” placeholder=”Search”>
  • 17. HTML5 Forms • Reduce custom validation Javascript • You can query if a field is valid with checkValidity(). • Custom validation possible via event handlers • Requires IE10 =( • Some javascript libs can close the gap.
  • 18. CSS3
  • 19. Eye Candy • border-radius (i.e. rounded corners) • box-shadow • gradient backgrounds • multiple backgrounds • transforms • transitions
  • 20. Use with fallback • border-radius • box-shadow • gradient backgrounds • multiple backgrounds • Make sure the design holds up to your standard on browsers that don’t support these
  • 22. Example 2 IE9 FF12 IE7 IE8
  • 23. Gnarly CSS .cta { display: inline-block; vertical-align: bottom; -webkit-box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.5); -moz-box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.5); box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.5); border-width: 0px; border-style: none; border-color: rgba(0,0,0,0); cursor: pointer; font-weight: bold; text-align: center; text-decoration: none; /* The is for the most commonly used design */ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; padding: 0 12px; font: bold 12px arial,helvetica,clean,sans-serif; line-height: 20px; color: white; background: #6ecb12; /* Old browsers */ background: -moz-linear-gradient(top, rgba(118,215,24,1) 19%, rgba(88,168,11,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(19%,rgba(118,215,24,1)), color-stop(100%,rgba(88,168,11,1))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(118,215,24,1) 19%, rgba(88,168,11,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(118,215,24,1) 19%,rgba(88,168,11,1) 100%); /* Opera11.10+ */ background: -ms-linear-gradient(top, rgba(118,215,24,1) 19%,rgba(88,168,11,1) 100%); /* IE10+ */ background: linear-gradient(top, rgba(118,215,24,1) 19%,rgba(88,168,11,1) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#76d718', endColorstr='#58a80b',GradientType=0 ); /* IE6-9 */ }
  • 24. CSS3 Tools • http://css3generator.com/ • http://border-radius.com/ • http://www.colorzilla.com/gradient-editor/
  • 25. Transitions • Replaces javascript for some types of animations • CSS language to define how an element changes from one state to another • Should be treated as optional and have a fall back or the page should work without them • Can be taxing on the browser
  • 27. Transforms • CSS language for scaling and rotating elements • Mixed with transistions, animation can be achieved. • May require browser specific tweaking or even non-standard CSS for IE. • Can confuse the box model and page flow
  • 28. Example The labels are rotated 90 degrees, but as you can see, Firebug things the element is in a different place than where it appears when drawn.
  • 29. Transforms .accordion .panel-label { -moz-transform-origin: 100% 0; -moz-transform: rotate(-90deg); -webkit-transform-origin: 100% 0; -webkit-transform: rotate(-90deg); -o-transform-origin: 100% 0; -o-transform: rotate(-90deg); transform-origin: 100% 0; transform: rotate(-90deg); position: absolute; top: 0; white-space:nowrap; text-align: right; /* MSIE < 10 */ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3)9; left: 0px9; }
  • 30. Eye Candy Issues • All of these techniques can be taxing on the browser and or device. • Excessive use of gradients and transforms can cause major browser lag • Many require browser prefixes (-moz or -webkit) or IE specific syntax (filter)
  • 31. Selectors tr:nth-child(2n+1) /* every odd row of an table */ tr:nth-child(odd) /* same */ tr:nth-child(2n+0) /* every even row of an table */ tr:nth-child(even) /* same */ tr:nth-last-child(-n+2) /* the two last rows of an table */ a:first-child /* a is first child of any element */ Also: :first-of-type :only-child :only-of-type :empty Browser performance may suffer using these on large, complex documents. Only use these when you can’t control the markup.
  • 32. How Selectors Work This is not CSS3, but just general knowledge you need • CSS is parsed and ALL rules are evaluated. More rules, more work for the browser • Rules are evaluated right to left • “.foo a” matches ALL a tags in the document and walks up the DOM to decide if they have a .foo parent.
  • 33. Media Queries @media all and (max-width: 699px) and (min-width: 520px), (min-width: 1151px) { body { background: #ccc; } } • Allow you to specify different CSS for different device specifications • You can use these now to help with mobile design and usability. Those devices support it, older browsers ignore it.
  • 34. Experiment Firefox IE6 http://brian.moonspot.net/experimenting-with-html5
  • 35. Conclusion • Understand your audience • HTML5 Doctype works for HTML4, try it • Use HTML5 semantic tags to fix bad HTML or on new projects • Video is not the Flash killer we all hoped for. But, it does have its uses. • HTML5 Forms have great potential, but still a nice to have for now.
  • 36. Conclusion • CSS3 eye candy is a great extra bit for users that can see it. Be sure you are happy with the fallback for others. • New CSS3 selectors are powerful, but good markup with classes is still better • CSS media queries are very helpful for formatting your pages on smaller screens and are supported on those platforms

Editor's Notes