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!

More Related Content

What's hot (20)

Html5
Html5Html5
Html5
Akash Tripathi
 
Progressive Prototyping w/HTML5, CSS3 and jQuery
Progressive Prototyping w/HTML5, CSS3 and jQueryProgressive Prototyping w/HTML5, CSS3 and jQuery
Progressive Prototyping w/HTML5, CSS3 and jQuery
Todd Zaki Warfel
 
Html5 ux london
Html5 ux londonHtml5 ux london
Html5 ux london
Todd Zaki Warfel
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Doctype html public
Doctype html publicDoctype html public
Doctype html public
Eddy_TKJ
 
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehrBeyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Jens-Christian Fischer
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
dynamis
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
www.netgains.org
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLsMobile 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 codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Laurence Svekis ✔
 
JavaScript
JavaScriptJavaScript
JavaScript
tutorialsruby
 
Espacios en-tu-vida
Espacios en-tu-vidaEspacios en-tu-vida
Espacios en-tu-vida
epacheco1
 
Guia de-estudio-2
Guia de-estudio-2Guia de-estudio-2
Guia de-estudio-2
59vallebenito
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
Kevin DeRudder
 
Introduction to web components
Introduction to web componentsIntroduction 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 BootstrapRapid 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]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 APIsHTML5 JS APIs
HTML5 JS APIs
Remy Sharp
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal 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)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 jQueryProgressive 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 CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Doctype html public
Doctype html publicDoctype html public
Doctype html public
Eddy_TKJ
 
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehrBeyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Jens-Christian Fischer
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
dynamis
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript 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-vidaEspacios en-tu-vida
Espacios en-tu-vida
epacheco1
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
Kevin DeRudder
 
Introduction to web components
Introduction to web componentsIntroduction 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 BootstrapRapid 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]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 2011Drupal 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)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)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)Hojas de estilo (css)
Hojas de estilo (css)
Krolina Agui
 
HTML5 & CSS 3
HTML5 & CSS 3HTML5 & CSS 3
HTML5 & CSS 3
Fabian Alcantara
 
Html5 aria-css-ibm-csun-2016
Html5 aria-css-ibm-csun-2016Html5 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)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?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 CSSQue es CSS? Presentacion Basica para CSS
Que es CSS? Presentacion Basica para CSS
josuew2013
 
Hojas de estilo CSS
Hojas de estilo CSSHojas 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?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 CSSHTML y CSS
HTML y CSS
Dinamiclerning
 
Introducción a HTML y CSS
Introducción a HTML y CSSIntroducción a HTML y CSS
Introducción a HTML y CSS
Adriana Tienda
 
Maquetado con HTML y CSS
Maquetado con HTML y CSSMaquetado con HTML y CSS
Maquetado con HTML y CSS
Manuel Razzari
 
Curso HTML y CSS, parte 1
Curso HTML y CSS, parte 1Curso 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)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)Hojas de estilo (css)
Hojas de estilo (css)
Krolina Agui
 
Hojas de estilo CSS (Cascade Style Sheets)
Hojas de estilo CSS (Cascade Style Sheets)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 CSSQue es CSS? Presentacion Basica para CSS
Que es CSS? Presentacion Basica para CSS
josuew2013
 
Hojas de estilo CSS
Hojas de estilo CSSHojas 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?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 CSSIntroducción a HTML y CSS
Introducción a HTML y CSS
Adriana Tienda
 
Maquetado con HTML y CSS
Maquetado con HTML y CSSMaquetado 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 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
Tadpole Collective
 
Html5 quick learning guide
Html5 quick learning guideHtml5 quick learning guide
Html5 quick learning guide
Prima Utama Apriansyah
 
Html5 quick-learning-quide
Html5 quick-learning-quideHtml5 quick-learning-quide
Html5 quick-learning-quide
Jerry Wijaya
 
Html5 quick-learning-quide
Html5 quick-learning-quideHtml5 quick-learning-quide
Html5 quick-learning-quide
Ashok Suragala
 
Html5 quick-learning-quide
Html5 quick-learning-quideHtml5 quick-learning-quide
Html5 quick-learning-quide
PL dream
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
Gonzalo Cordero
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
vamsitricks
 
Html5 training
Html5 trainingHtml5 training
Html5 training
James VanDyke
 
Html5, a gentle introduction
Html5, a gentle introduction Html5, a gentle introduction
Html5, a gentle introduction
Diego Scataglini
 
Unit 1wt
Unit 1wtUnit 1wt
Unit 1wt
vamsi krishna
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics 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 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
Darren Wood
 
HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)
博史 高木
 
Html5
Html5Html5
Html5
Satoshi Kikuchi
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introduction
Diego Scataglini
 
Light introduction to HTML
Light introduction to HTMLLight introduction to HTML
Light introduction to HTML
abidibo Contini
 
web technologiesUnit 1
web technologiesUnit 1web technologiesUnit 1
web technologiesUnit 1
Pathi Radhika
 
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In DrupalBeginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Mediacurrent
 
Html n CSS
Html n CSSHtml 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 8Pamela - 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-quideHtml5 quick-learning-quide
Html5 quick-learning-quide
Jerry Wijaya
 
Html5 quick-learning-quide
Html5 quick-learning-quideHtml5 quick-learning-quide
Html5 quick-learning-quide
Ashok Suragala
 
Html5 quick-learning-quide
Html5 quick-learning-quideHtml5 quick-learning-quide
Html5 quick-learning-quide
PL dream
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
Gonzalo Cordero
 
Html5, a gentle introduction
Html5, a gentle introduction Html5, a gentle introduction
Html5, a gentle introduction
Diego Scataglini
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics 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 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
Darren Wood
 
HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)HTML5+CSS3 (入門編)
HTML5+CSS3 (入門編)
博史 高木
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introduction
Diego Scataglini
 
Light introduction to HTML
Light introduction to HTMLLight introduction to HTML
Light introduction to HTML
abidibo Contini
 
web technologiesUnit 1
web technologiesUnit 1web technologiesUnit 1
web technologiesUnit 1
Pathi Radhika
 
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In DrupalBeginner & 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 8Pamela - 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)

Jira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : IntroductionJira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : Introduction
Ravi Teja
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
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
 
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
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
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
 
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
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
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
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
Introducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRCIntroducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRC
Adtran
 
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
 
6th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 20256th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 2025
DanBrown980551
 
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
 
Jira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : IntroductionJira Administration Training – Day 1 : Introduction
Jira Administration Training – Day 1 : Introduction
Ravi Teja
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
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
 
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
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
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
 
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
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
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
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
Introducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRCIntroducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRC
Adtran
 
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
 
6th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 20256th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 2025
DanBrown980551
 
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
 

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=”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
  • 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