SlideShare a Scribd company logo
HTML5 & CSS
AN OVERVIEW
HTML5 // Cleaning redundancy


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
HTML5 // Cleaning redundancy




 AM !
B <!doctype html>
HTML5 // Cleaning redundancy


                  <meta http-equiv="Content-Type"
HTML 4.01         content="text/html; charset=utf-8">




                  <?xml version="1.0" encoding="UTF-8"?>
XHTML 1.0         <meta http-equiv="Content-Type"
                  content="text/html; charset=utf-8">
HTML5 // Cleaning redundancy




<meta charset=”utf-8”>
                       BA M!!
               D ouble
HTML5 // Cleaning redundancy



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



<script src=”jquery.js” type=”text/javascript”></script>
HTML5 // Cleaning redundancy



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



<script src=”jquery.js” type=”text/javascript”></script>
HTML5 // Cleaning redundancy



<link rel="stylesheet" href="styles.css” />



<script src=”jquery.js”></script>




                              ...looks much prettier!
HTML5 // New elements

<header>                                                                    <video>

<nav>                                                                   <figure>

<section>                                                               <footer>

<article>                                                                    <time>

<aside>                                                          <datalist>


           To check all elements: http://joshduck.com/periodic-table.html
HTML5 // Common structure
<body>                           <div class=”article”>
   <div class=”header”>             <h1>Article head</h1>
      <h1>Company logo</h1>         <p>Article paragraph</p>
      <p>Tagline</p>                <div class=”aside”>
   </div>                              <p>pointer for article</p>
   <div class=”nav”>                </div>
      <ul>                       </div>
         <li>link1</li>          <div class=”figure”>
         <li>link2</li>             <img src=”...”>
      </ul>                         <div class=”figcaption”>text</div>
   </div>                        </div>
   <div class=”section”>         <footer>
      <div class=”article”>         &copy;
         <div class=”header”>       <time datetime=”2012-11-08”>
            <h1>...</h1>               2012</time>
         </div>                  </footer>
         <div class=”section”>   </body>
         ...
         </div>
      </div>
HTML5 // Common structure
<body>                           <article>
   <header>                         <h1>Article head</h1>
      <h1>Company logo</h1>         <p>Article paragraph</p>
      <p>Tagline</p>                <aside>
   </header>                           <p>pointer for article</p>
   <nav>                            </aside>
      <ul>                       </article>
         <li>link1</li>          <figure>
         <li>link2</li>             <img src=”...”>
      </ul>                         <figcaption>text</figcaption>
   </nav>                        </figure>
   <section>                     <footer>
      <article>                     &copy;
         <header>                   <time datetime=”2012-11-08”>
            <h1>...</h1>               2012</time>
         </header>               </footer>
         <section>               </body>
         ...
         </section>
      </article>
                              ...much better semantic!
HTML5 // Common structure

<section class=”item”>
   <header>
      <h1></h1>
   </header>
   <footer class=”meta”>...</footer>
   <div class=”content”>
      ...
   </div>
   <nav class=”links”>
   ...
   </nav>
</section>
HTML5 // Common structure



<a href=”#” target=“_blank”>
   <div class=”panel”>
      <h2>Banner title</h2>
      <p>Get your 50% discount now, mofo!</p>
   </div>
</a>
HTML5 // Forms

<input type=”text” required>

<input type=”email” value=”i@i.com”>

<input type=”date” min=”2010-08-14” max=”2016-08-14” value=”2010-08-10”>

<input type=”range” min=”0” max=”50” value=”11”>

<input type=”search” placeholder=”Type city or property”>

<input type=”tel” placeholder=”(353)657778888 patter=”[regexp]”>

<input type=”color” placeholder=”#ff00ff”>

<input type=”number” step=”1” min=”-5” max=”10” value=”0”>




                                             ...example available
HTML5 // Audio & Video




<audio id=”audio” scr=”song.mp3” controls></audio>

<video id=”video” src=”video.mov” autoplay controls></video>
HTML5 // Audio & Video
                          d egrad e grac efully.
                       ...

<video id=”video” src=”video.mov” autoplay controls>
   <object data=”video.mov”>
   <!-- fallback content -->
   </object>
</video>
CSS // Pseudo classes

Relational         Links      Input       Text

:not               :link      :focus      :first-letter
:empty             :visited   :target     :first-line
                   :hover     :enabled    :lang
                   :active    :disabled   ::selection
Position                      :checked


:first-child
:last-child
:nth-child(n)
:nth-of-type(n)
:first-of-type
:last-of-type
:nth-last-of-type(n)
:nth-last-child(n)
:only-of-type
CSS // Pseudo classes

Relational         Links        Input       Text

:not               :link        :focus      :first-letter
:empty             :visited     :target     :first-line
                   :hover       :enabled    :lang
                   :active      :disabled   ::selection
Position                        :checked


:first-child
:last-child
:nth-child(n)
:nth-of-type(n)
                              BAD NEWs...
:first-of-type
:last-of-type
                              Most of these don’t
:nth-last-of-type(n)
:nth-last-child(n)
:only-of-type
                              work on old popular
                              browsers! :(
CSS // Pseudo classes

Relational         Links         Input          Text

:not               :link         :focus         :first-letter
:empty             :visited      :target        :first-line
                   :hover        :enabled       :lang
                   :active       :disabled      ::selection
Position                         :checked


:first-child
:last-child
:nth-child(n)
:nth-of-type(n)
                              SOLUTION?
:first-of-type
:last-of-type
                              Use more markup or
:nth-last-of-type(n)
:nth-last-child(n)            try Selectivizr.com
:only-of-type
CSS // Pseudo classes

Relational         Links        Input        Text

:not               :link        :focus       :first-letter
:empty             :visited     :target      :first-line
                   :hover       :enabled     :lang
                   :active      :disabled    ::selection
Position                        :checked


:first-child
:last-child
:nth-child(n)
:nth-of-type(n)
                              GOOD NEWS...
:first-of-type
:last-of-type
                              They all work great on
:nth-last-of-type(n)
:nth-last-child(n)
:only-of-type
                              IE9, webkit browsers,
                              Firefox and Opera...
CSS // Pseudo classes

Relational         Links         Input         Text

:not               :link         :focus        :first-letter
:empty             :visited      :target       :first-line
                   :hover        :enabled      :lang
                   :active       :disabled     ::selection
Position                         :checked


:first-child
:last-child
:nth-child(n)
:nth-of-type(n)
                              GOOD NEWS...
:first-of-type
:last-of-type
                              ... meaning, very suitable
:nth-last-of-type(n)
:nth-last-child(n)
:only-of-type
                              to work on mobile
                              browsers :)
CSS // Some examples


elem:nth-child(5) { color:orange; }




elem:nth-child(n+6) { color:orange; }




elem:nth-child(-n+5) { color:orange; }




elem:nth-child(4n-7) { color:orange; }
CSS // Some examples


elem:nth-child(odd) { color:orange; }




elem:nth-child(even) { color:orange; }




elem:last-child { color:orange; }




elem:last-child(2) { color:orange; }
CSS // Some examples

 “What goes around comes around”

       <blockquote>
HTML      <p>What goes around comes around</p>
       </blockquote>



       p:before {                 p:after {

CSS       content:’”’;
          color:light-green;
                                     content:’”’;
                                     color:light-green;
       }                          }
CSS // Some examples

                i   WARNING!

HTML   <p class=”warning”>Warning!</p>




       p:before {
CSS       content:””;
          background:url(warning-icon.png) 0 0 no-repeat;
          display:inline-block;
          margin-right:10px;
       }
CSS // Some examples

               i   SIGN UP HERE

HTML   <p class=”sign-up”>sign up here</p>


 CSS   .sign-up:before {
          content:””;
          background:url(warning-icon.png) 0 0 no-repeat;
          display:inline-block;
          margin-right:10px;
       }

       .sign-up:after {
          content:””;
          background:url(arrow.png) 0 0 no-repeat;
          position:absolute;
          bottom:-15px; left:50%;
       }
CSS // Some examples

               i   SIGN UP HERE

HTML   <p class=”sign-up”>sign up here</p>


 CSS   .sign-up:before {
          /* same code as previous slide */
       }

       .sign-up:after {
          content:””;
          position:absolute; bottom:0; left:50%;
          width: 0;
          height: 0;
          border-left: 15px solid transparent;

                                                   ro w im g!
       }
          border-right: 15px solid transparent;
          border-top: 30px solid orange;
                                              no ar
RESOURCES
http://html5doctor.com/css3-pseudo-classes-and-html5-forms
http://www.developer.nokia.com/document/Mobile_Web_Templates_for_Smartphones_Examples/content.html
http://mobilehtml5.org/
http://css-tricks.com/pseudo-class-selectors/
http://css-tricks.com/pseudo-element-roundup/
http://www.sitepoint.com/css3-tabs-using-target-selector/
http://slides.html5rocks.com/#landing-slide
http://selectivizr.com
Thanks!
Ad

Recommended

Introduccion a HTML5
Introduccion a HTML5
Pablo Garaizar
 
Frfrfrf
Frfrfrf
Nelinho Pereira
 
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Nicholas Zakas
 
Netvibes UWA workshop at ParisWeb 2007
Netvibes UWA workshop at ParisWeb 2007
Netvibes
 
High-Quality JavaScript
High-Quality JavaScript
Marc Bächinger
 
HTML 5 - Overview
HTML 5 - Overview
Marcelio Leal
 
Opening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the Islands
Bastian Hofmann
 
HTML5 and the web of tomorrow!
HTML5 and the web of tomorrow!
Christian Heilmann
 
Html5
Html5
Akash Tripathi
 
Progressive Prototyping w/HTML5, CSS3 and jQuery
Progressive Prototyping w/HTML5, CSS3 and jQuery
Todd Zaki Warfel
 
Html5 ux london
Html5 ux london
Todd Zaki Warfel
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Doctype html public
Doctype html public
Eddy_TKJ
 
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Jens-Christian Fischer
 
Keypoints html5
Keypoints html5
dynamis
 
Introduction to Html5
Introduction to Html5
www.netgains.org
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
Harvard Web Working Group
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Laurence Svekis ✔
 
JavaScript
JavaScript
tutorialsruby
 
Espacios en-tu-vida
Espacios en-tu-vida
epacheco1
 
Guia de-estudio-2
Guia de-estudio-2
59vallebenito
 
What you need to know bout html5
What you need to know bout html5
Kevin DeRudder
 
Introduction to web components
Introduction to web components
Marc Bächinger
 
Rapid and Responsive - UX to Prototype with Bootstrap
Rapid and Responsive - UX to Prototype with Bootstrap
Josh Jeffryes
 
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
Aaron Gustafson
 
HTML5 JS APIs
HTML5 JS APIs
Remy Sharp
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)
Ontico
 
1. Introducción a las Hojas de estilo (CSS)
1. Introducción a las Hojas de estilo (CSS)
Aplicaciones Gráficas
 
Hojas de estilo (css)
Hojas de estilo (css)
Krolina Agui
 

More Related Content

What's hot (20)

Html5
Html5
Akash Tripathi
 
Progressive Prototyping w/HTML5, CSS3 and jQuery
Progressive Prototyping w/HTML5, CSS3 and jQuery
Todd Zaki Warfel
 
Html5 ux london
Html5 ux london
Todd Zaki Warfel
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Doctype html public
Doctype html public
Eddy_TKJ
 
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Jens-Christian Fischer
 
Keypoints html5
Keypoints html5
dynamis
 
Introduction to Html5
Introduction to Html5
www.netgains.org
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
Harvard Web Working Group
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Laurence Svekis ✔
 
JavaScript
JavaScript
tutorialsruby
 
Espacios en-tu-vida
Espacios en-tu-vida
epacheco1
 
Guia de-estudio-2
Guia de-estudio-2
59vallebenito
 
What you need to know bout html5
What you need to know bout html5
Kevin DeRudder
 
Introduction to web components
Introduction to web components
Marc Bächinger
 
Rapid and Responsive - UX to Prototype with Bootstrap
Rapid and Responsive - UX to Prototype with Bootstrap
Josh Jeffryes
 
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
Aaron Gustafson
 
HTML5 JS APIs
HTML5 JS APIs
Remy Sharp
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)
Ontico
 
Progressive Prototyping w/HTML5, CSS3 and jQuery
Progressive Prototyping w/HTML5, CSS3 and jQuery
Todd Zaki Warfel
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Doctype html public
Doctype html public
Eddy_TKJ
 
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Jens-Christian Fischer
 
Keypoints html5
Keypoints html5
dynamis
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Laurence Svekis ✔
 
Espacios en-tu-vida
Espacios en-tu-vida
epacheco1
 
What you need to know bout html5
What you need to know bout html5
Kevin DeRudder
 
Introduction to web components
Introduction to web components
Marc Bächinger
 
Rapid and Responsive - UX to Prototype with Bootstrap
Rapid and Responsive - UX to Prototype with Bootstrap
Josh Jeffryes
 
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
Aaron Gustafson
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
Progressive downloads and rendering (Stoyan Stefanov)
Progressive downloads and rendering (Stoyan Stefanov)
Ontico
 

Viewers also liked (13)

1. Introducción a las Hojas de estilo (CSS)
1. Introducción a las Hojas de estilo (CSS)
Aplicaciones Gráficas
 
Hojas de estilo (css)
Hojas de estilo (css)
Krolina Agui
 
HTML5 & CSS 3
HTML5 & CSS 3
Fabian Alcantara
 
Html5 aria-css-ibm-csun-2016
Html5 aria-css-ibm-csun-2016
Maureen (Moe) Kraft
 
Hojas de estilo CSS (Cascade Style Sheets)
Hojas de estilo CSS (Cascade Style Sheets)
Juan Rodríguez
 
Qué es CSS y con qué se come?
Qué es CSS y con qué se come?
Juan Pernia (juanrules)
 
Que es CSS? Presentacion Basica para CSS
Que es CSS? Presentacion Basica para CSS
josuew2013
 
Hojas de estilo CSS
Hojas de estilo CSS
Ramón RS
 
CSS - ¿Cómo agregar estilos a mi página?
CSS - ¿Cómo agregar estilos a mi página?
Harold Maduro
 
HTML y CSS
HTML y CSS
Dinamiclerning
 
Introducción a HTML y CSS
Introducción a HTML y CSS
Adriana Tienda
 
Maquetado con HTML y CSS
Maquetado con HTML y CSS
Manuel Razzari
 
Curso HTML y CSS, parte 1
Curso HTML y CSS, parte 1
Sergio Nouvel Castro
 
1. Introducción a las Hojas de estilo (CSS)
1. Introducción a las Hojas de estilo (CSS)
Aplicaciones Gráficas
 
Hojas de estilo (css)
Hojas de estilo (css)
Krolina Agui
 
Hojas de estilo CSS (Cascade Style Sheets)
Hojas de estilo CSS (Cascade Style Sheets)
Juan Rodríguez
 
Que es CSS? Presentacion Basica para CSS
Que es CSS? Presentacion Basica para CSS
josuew2013
 
Hojas de estilo CSS
Hojas de estilo CSS
Ramón RS
 
CSS - ¿Cómo agregar estilos a mi página?
CSS - ¿Cómo agregar estilos a mi página?
Harold Maduro
 
Introducción a HTML y CSS
Introducción a HTML y CSS
Adriana Tienda
 
Maquetado con HTML y CSS
Maquetado con HTML y CSS
Manuel Razzari
 
Ad

Similar to Html5 & CSS overview (20)

Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
Tadpole Collective
 
Html5 quick learning guide
Html5 quick learning guide
Prima Utama Apriansyah
 
Html5 quick-learning-quide
Html5 quick-learning-quide
Jerry Wijaya
 
Html5 quick-learning-quide
Html5 quick-learning-quide
Ashok Suragala
 
Html5 quick-learning-quide
Html5 quick-learning-quide
PL dream
 
2022 HTML5: The future is now
2022 HTML5: The future is now
Gonzalo Cordero
 
Unit 1wt
Unit 1wt
vamsitricks
 
Html5 training
Html5 training
James VanDyke
 
Html5, a gentle introduction
Html5, a gentle introduction
Diego Scataglini
 
Unit 1wt
Unit 1wt
vamsi krishna
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
Sahil Gandhi
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
Darren Wood
 
HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)
博史 高木
 
Html5
Html5
Satoshi Kikuchi
 
Html 5, a gentle introduction
Html 5, a gentle introduction
Diego Scataglini
 
Light introduction to HTML
Light introduction to HTML
abidibo Contini
 
web technologiesUnit 1
web technologiesUnit 1
Pathi Radhika
 
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Mediacurrent
 
Html n CSS
Html n CSS
Sukrit Gupta
 
Pamela - Brining back the pleasure of hand-written HTML - Montréal Python 8
Pamela - Brining back the pleasure of hand-written HTML - Montréal Python 8
spierre
 
Html5 quick-learning-quide
Html5 quick-learning-quide
Jerry Wijaya
 
Html5 quick-learning-quide
Html5 quick-learning-quide
Ashok Suragala
 
Html5 quick-learning-quide
Html5 quick-learning-quide
PL dream
 
2022 HTML5: The future is now
2022 HTML5: The future is now
Gonzalo Cordero
 
Html5, a gentle introduction
Html5, a gentle introduction
Diego Scataglini
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
Sahil Gandhi
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
Darren Wood
 
HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)
博史 高木
 
Html 5, a gentle introduction
Html 5, a gentle introduction
Diego Scataglini
 
Light introduction to HTML
Light introduction to HTML
abidibo Contini
 
web technologiesUnit 1
web technologiesUnit 1
Pathi Radhika
 
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Mediacurrent
 
Pamela - Brining back the pleasure of hand-written HTML - Montréal Python 8
Pamela - Brining back the pleasure of hand-written HTML - Montréal Python 8
spierre
 
Ad

Recently uploaded (20)

Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
ICT Frame Magazine Pvt. Ltd.
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
ICT Frame Magazine Pvt. Ltd.
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 

Html5 & CSS overview

  • 1. HTML5 & CSS AN OVERVIEW
  • 2. HTML5 // Cleaning redundancy <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  • 3. HTML5 // Cleaning redundancy AM ! B <!doctype html>
  • 4. HTML5 // Cleaning redundancy <meta http-equiv="Content-Type" HTML 4.01 content="text/html; charset=utf-8"> <?xml version="1.0" encoding="UTF-8"?> XHTML 1.0 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  • 5. HTML5 // Cleaning redundancy <meta charset=”utf-8”> BA M!! D ouble
  • 6. HTML5 // Cleaning redundancy <link rel="stylesheet" href="styles.css" type="text/css" /> <script src=”jquery.js” type=”text/javascript”></script>
  • 7. HTML5 // Cleaning redundancy <link rel="stylesheet" href="styles.css" type=”text/css” /> <script src=”jquery.js” type=”text/javascript”></script>
  • 8. HTML5 // Cleaning redundancy <link rel="stylesheet" href="styles.css” /> <script src=”jquery.js”></script> ...looks much prettier!
  • 9. HTML5 // New elements <header> <video> <nav> <figure> <section> <footer> <article> <time> <aside> <datalist> To check all elements: http://joshduck.com/periodic-table.html
  • 10. HTML5 // Common structure <body> <div class=”article”> <div class=”header”> <h1>Article head</h1> <h1>Company logo</h1> <p>Article paragraph</p> <p>Tagline</p> <div class=”aside”> </div> <p>pointer for article</p> <div class=”nav”> </div> <ul> </div> <li>link1</li> <div class=”figure”> <li>link2</li> <img src=”...”> </ul> <div class=”figcaption”>text</div> </div> </div> <div class=”section”> <footer> <div class=”article”> &copy; <div class=”header”> <time datetime=”2012-11-08”> <h1>...</h1> 2012</time> </div> </footer> <div class=”section”> </body> ... </div> </div>
  • 11. HTML5 // Common structure <body> <article> <header> <h1>Article head</h1> <h1>Company logo</h1> <p>Article paragraph</p> <p>Tagline</p> <aside> </header> <p>pointer for article</p> <nav> </aside> <ul> </article> <li>link1</li> <figure> <li>link2</li> <img src=”...”> </ul> <figcaption>text</figcaption> </nav> </figure> <section> <footer> <article> &copy; <header> <time datetime=”2012-11-08”> <h1>...</h1> 2012</time> </header> </footer> <section> </body> ... </section> </article> ...much better semantic!
  • 12. HTML5 // Common structure <section class=”item”> <header> <h1></h1> </header> <footer class=”meta”>...</footer> <div class=”content”> ... </div> <nav class=”links”> ... </nav> </section>
  • 13. HTML5 // Common structure <a href=”#” target=“_blank”> <div class=”panel”> <h2>Banner title</h2> <p>Get your 50% discount now, mofo!</p> </div> </a>
  • 14. HTML5 // Forms <input type=”text” required> <input type=”email” value=”[email protected]”> <input type=”date” min=”2010-08-14” max=”2016-08-14” value=”2010-08-10”> <input type=”range” min=”0” max=”50” value=”11”> <input type=”search” placeholder=”Type city or property”> <input type=”tel” placeholder=”(353)657778888 patter=”[regexp]”> <input type=”color” placeholder=”#ff00ff”> <input type=”number” step=”1” min=”-5” max=”10” value=”0”> ...example available
  • 15. HTML5 // Audio & Video <audio id=”audio” scr=”song.mp3” controls></audio> <video id=”video” src=”video.mov” autoplay controls></video>
  • 16. HTML5 // Audio & Video d egrad e grac efully. ... <video id=”video” src=”video.mov” autoplay controls> <object data=”video.mov”> <!-- fallback content --> </object> </video>
  • 17. CSS // Pseudo classes Relational Links Input Text :not :link :focus :first-letter :empty :visited :target :first-line :hover :enabled :lang :active :disabled ::selection Position :checked :first-child :last-child :nth-child(n) :nth-of-type(n) :first-of-type :last-of-type :nth-last-of-type(n) :nth-last-child(n) :only-of-type
  • 18. CSS // Pseudo classes Relational Links Input Text :not :link :focus :first-letter :empty :visited :target :first-line :hover :enabled :lang :active :disabled ::selection Position :checked :first-child :last-child :nth-child(n) :nth-of-type(n) BAD NEWs... :first-of-type :last-of-type Most of these don’t :nth-last-of-type(n) :nth-last-child(n) :only-of-type work on old popular browsers! :(
  • 19. CSS // Pseudo classes Relational Links Input Text :not :link :focus :first-letter :empty :visited :target :first-line :hover :enabled :lang :active :disabled ::selection Position :checked :first-child :last-child :nth-child(n) :nth-of-type(n) SOLUTION? :first-of-type :last-of-type Use more markup or :nth-last-of-type(n) :nth-last-child(n) try Selectivizr.com :only-of-type
  • 20. CSS // Pseudo classes Relational Links Input Text :not :link :focus :first-letter :empty :visited :target :first-line :hover :enabled :lang :active :disabled ::selection Position :checked :first-child :last-child :nth-child(n) :nth-of-type(n) GOOD NEWS... :first-of-type :last-of-type They all work great on :nth-last-of-type(n) :nth-last-child(n) :only-of-type IE9, webkit browsers, Firefox and Opera...
  • 21. CSS // Pseudo classes Relational Links Input Text :not :link :focus :first-letter :empty :visited :target :first-line :hover :enabled :lang :active :disabled ::selection Position :checked :first-child :last-child :nth-child(n) :nth-of-type(n) GOOD NEWS... :first-of-type :last-of-type ... meaning, very suitable :nth-last-of-type(n) :nth-last-child(n) :only-of-type to work on mobile browsers :)
  • 22. CSS // Some examples elem:nth-child(5) { color:orange; } elem:nth-child(n+6) { color:orange; } elem:nth-child(-n+5) { color:orange; } elem:nth-child(4n-7) { color:orange; }
  • 23. CSS // Some examples elem:nth-child(odd) { color:orange; } elem:nth-child(even) { color:orange; } elem:last-child { color:orange; } elem:last-child(2) { color:orange; }
  • 24. CSS // Some examples “What goes around comes around” <blockquote> HTML <p>What goes around comes around</p> </blockquote> p:before { p:after { CSS content:’”’; color:light-green; content:’”’; color:light-green; } }
  • 25. CSS // Some examples i WARNING! HTML <p class=”warning”>Warning!</p> p:before { CSS content:””; background:url(warning-icon.png) 0 0 no-repeat; display:inline-block; margin-right:10px; }
  • 26. CSS // Some examples i SIGN UP HERE HTML <p class=”sign-up”>sign up here</p> CSS .sign-up:before { content:””; background:url(warning-icon.png) 0 0 no-repeat; display:inline-block; margin-right:10px; } .sign-up:after { content:””; background:url(arrow.png) 0 0 no-repeat; position:absolute; bottom:-15px; left:50%; }
  • 27. CSS // Some examples i SIGN UP HERE HTML <p class=”sign-up”>sign up here</p> CSS .sign-up:before { /* same code as previous slide */ } .sign-up:after { content:””; position:absolute; bottom:0; left:50%; width: 0; height: 0; border-left: 15px solid transparent; ro w im g! } border-right: 15px solid transparent; border-top: 30px solid orange; no ar