SlideShare a Scribd company logo
INTRODUCCIÓN A




 Pablo Garaizar Sagarminaga
UniEncounter 2011, Eibar/Ermua
Agenda
●   Breve historia de HTML5.
●   ¿Qué es y qué no es HTML5?
●   Novedades en...
    ●   HTML
    ●   CSS
    ●   JS
●   Soporte actual de HTML5
Breve historia...
Source: David P. Heitmeyer, CSCI E-12 (Spring 2011), Harvard University
¿Qué es...
Timed
Canvas                       Web
                 media
2D API           playback   Storage


 MIME type
and protocol                Document
  handler
                Microdata
                             editing
 registration




                  Cross-
Browser                      Drag
                document
 history        messaging   & drop
...y qué no es?
Web
Geolocation    SQL       File API
              Database




WebGL          SVG        CSS3




                The
   Web        Indexed     Web
 Workers      Database   sockets
                API
A pesar de esto...
JS
HTML5   CSS3
               APIs
Novedades
En HTML
<!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 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1­strict.dtd">




<!DOCTYPE html>


            Declaración simplificada
Nueva estructura de documento
<html>
<html lang="en">


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

<meta charset="utf­8" />


<link>
<link rel=”stylesheet|alternate|icon|license|prefetch|
nofollow|noreferrer|pingback|search|sidebar|tag”>



                   Nueva cabecera
<time>
<time datetime="2011­03­17T17:59:37+01:00" pubdate>
  March 17, 2011 5:37pm GMT+1
</time>


<mark>
<p>This is <m>really important</m> to understand HTML5</p>




               Etiquetas semánticas
<meter>
<p>G­force is
<meter value="9.2" min="0" max="19.6" low="9.5" high="10.3" 
optimum="9.8">9.2</meter>.
</p>


<progress>
<p>Downloaded: 
  <progress value="1534602" max="4603807">33%</progress>
</p>




              Etiquetas semánticas
<audio>
<audio src="music.mp3"
    autoplay loop="3" controls preload />



<video>
<video width="320" height="240" controls>
  <source src="pr6.mp4"  type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
  <source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"'>
  <source src="pr6.ogv"  type='video/ogg; codecs="theora, vorbis"'>
</video>




                           Multimedia
<canvas>
<canvas id=”area” width=”320” height=”240”>
</canvas>

<script>
function draw() {
  var area = document.getElementById("area");
  var ctx = area.getContext("2d");
  ctx.fillRect(50, 25, 150, 100);
}
</script>



Se pueden hacer muchas cosas: rectángulos, círculos, elipses, caminos, texto,
imágenes, gradientes, transformaciones.




                                Canvas
<svg>
<svg id="flag" height="200" xmlns="http://www.w3.org/2000/svg">
  <circle id="redcircle" cx="50" cy="50" r="50" fill="red" />
  <rect id="redrect" width="300" height="100" fill="white" />
  <line x1="0" y1="0" x2="200" y2="100"
          style="stroke:red;stroke­width:2"/>
  <ellipse cx="100" cy="50" rx="100" ry="50" fill="red" />
  <polygon  points="20,10 300,20, 170,50" fill="white" />
  <polyline points="0,0 0,20 20,20 20,40 40,40 40,60" fill="red" />
</svg>




                                 SVG
<input>
<input
  type="search"                            search box
  type="number"                            spinbox
  type="range"                             slider
  type="color"                             color picker
  type="tel"                               telephone number
  type="url"                               web address
  type="email"                             email address
  type="date|time|month|week|datetime"
  required autofocus placeholder=”Type here...”
/>




                        Formularios
<datalist>
<input type=”text” list="cars" />
<datalist id="cars">
  <option value="BMW">
  <option value="Ford">
  <option value="Volvo">
</datalist>



<keygen>
<form action="signup.asp" method="post">
  user: <input type="text" name="username" />
  encryption: <keygen name="security" />
  <input type="submit" />
</form>




                       Formularios
<menu> + <command>
<menu>
  <command onclick="alert('first!')" label="Do 1st Command"/>
  <command onclick="alert('second!')" label="Do 2nd Command"/>
  <command onclick="alert('third!')" label="Do 3rd Command"/>
</menu>



<datagrid>
<datagrid>
  <table ...>
</datagrid>




                Etiquetas interactivas
<details>
Dive into HTML5 
<details open>
  <legend>Pilgrim, M. (2011)</legend>
  <p>
    Mark Pilgrim, Dive into HTML5, 
    <a href=”http://diveintohtml5.org”>updated!</a>.
  </p>    
</details>




                Etiquetas interactivas
<figure> + 
<figcaption>
<figure>
  <img src=”fig1.jpg” title=”Graphic” />
  <figcaption>Figure 1. Overall scores.</figcaption>
</figure>



<wbr>
<p>You can break the line here<wbr> or here<wbr>, or even here<wbr>.</p>




                       Otras etiquetas
En CSS
E[att^=”val”]
E[att$=”val”]
E[att*=”val”]
                                   E:empty
E:root                             E:target
E:nth­child(n)                     E:enabled
E:nth­last­child(n)                E:disabled
E:nth­of­type(n)                   E:checked
E:nth­last­of­type(n)              E:selection
E:last­child
                                   E:not(selector)
E:first­of­type                    E ~ F
E:last­of­type
E:only­child
E:only­of­type




                  Nuevos selectores
http://www.456bereastreet.com/archive/200601/css_3_selectors_explained/
border­radius
border­top­left­radius
border­top­right­radius
border­bottom­right­radius
border­bottom­left­radius

­webkit­border­radius
­webkit­border­top­left­radius
­webkit­border­top­right­radius
­webkit­border­bottom­right­radius
­webkit­border­bottom­left­radius

­moz­border­radius
­moz­border­radius­topleft
­moz­border­radius­topright
­moz­border­radius­bottomright
­moz­border­radius­bottomleft




              Bordes redondeados
#skew {
   transform:skew(35deg);
}
#scale {
   transform:scale(1,0.5);
}
#rotate {
   transform:rotate(45deg);
}
#translate {
   transform:translate(10px, 20px);
}

#rotate­skew­scale­translate {
   transform:skew(30deg) scale(1.1,1.1) rotate(40deg) 
translate(10px, 20px);
}



                 Transformaciones
               http://css3.bradshawenterprises.com/
#id {
   ­webkit­transition: all 1s ease­in­out;
   ­moz­transition: all 1s ease­in­out;
   ­o­transition: all 1s ease­in­out;
   transition: all 1s ease­in­out;
}




                     Transiciones
@font­face {
  font­family: <a­remote­font­name>;
  src: <source> [,<source>]*;
  [font­weight: <weight>];
  [font­style: <style>];
}

@font­face {
  font­family: "Bitstream Vera Serif Bold";
  src: url("http://server.com/VeraSeBd.ttf");
}
   
body { font­family: "Bitstream Vera Serif Bold", serif }




                     @font-face
                    http://www.font-face.com
En JS
function get_location() {
  navigator.geolocation.getCurrentPosition(show_location);
}

function show_location(position) {
  var latitude = position.coords.latitude;
  var longitude = position.coords.longitude;
  alert('You are here: ('+latitude+','+longitude+')');
}




                  Geolocalización
function show_status() {
  var status = navigator.onLine ? 'Online' : 'Offline';
  alert('You are '+status);
}


Eventos nuevos:

   window.ononline
   window.onoffline




                      Offline / online
var foo = localStorage.getItem("bar");
// ...
localStorage.setItem("bar", foo);


var foo = localStorage["bar"];
// ...
localStorage["bar"] = foo;


Algunos navegadores soportan Web SQL Database (WebDB), pero no está
estandarizado.




                      Local Storage
history.pushState(json, title, url);

addEvent(window, 'popstate', function (event) {
  var data = event.state;
  //...
});




                     Web History
Todo esto, ¿para cuándo?
En teoría, HTML5 no será un
   estándar hasta 2022
En la práctica, soportadas muchas cosas
           http://www.findmebyip.com/litmus
Buena práctica: detectar
funcionalidades soportadas
function supports_canvas() {
  return !!document.createElement('canvas').getContext;
  //return Modernizr.canvas;
}

function supports_video() {
  return !!document.createElement('video').canPlayType;
  //return Modernizr.video;
}

function supports_ogg_theora_video() {
  if (!supports_video()) { return false; }
  var v = document.createElement("video");
  return v.canPlayType('video/ogg; codecs="theora, 
vorbis"');
  //return Modernizr.video.ogg;
}




        Detección de funcionalidades
Modernizr
http://www.modernizr.com
¿Y si no hay soporte?
       Polyfills
<!­­[if lt IE 9]>
<script>
  var e = ("abbr,article,aside,audio,canvas,datalist," +
    "details,figure,footer,header,hgroup,mark,menu,meter," +
    "nav,output,progress,section,time,video").split(',');
  for (var i = 0; i < e.length; i++) {
    document.createElement(e[i]);
  }
</script>
<![endif]­­>




              ¿Polyqué? Polyfills ;-)
Polyfills
https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills
Para saber más...
W3C
http://dev.w3.org/html5/spec/Overview.html
WHATWG
http://whatwg.org/html
Dive into HTML5
 http://diveintohtml5.org/
HTML5 Rocks
http://www.html5rocks.com
Improving the Performance of your HTML5 App
      http://www.html5rocks.com/tutorials/speed/html5/
HTML 5 Demos and Examples
      http://html5demos.com
Muchas gracias ;-)
Referencias
●   Dive into HTML5.
●   W3Schools.
●   IBM developer networks.
●   Quackit.
●   HTML5 Rocks.
●   HTML5 Demos and Examples.
All images are property of their own
owners*, content is licensed under a
Creative Commons by-sa 3.0 license




 * W3C, WHATWG, Dive into HTML5, HTML5 Rocks, Modernizr, FindmebyIP

More Related Content

PDF
Html5 & CSS overview
PDF
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
PDF
HTML5 Semantics, Accessibility & Forms [Carsonified HTML5 Online Conference]
PPTX
Getting Started with HTML5 in Tech Com (STC 2012)
ODP
PDF
PDF
Echo HTML5
KEY
HTML5 Intro
Html5 & CSS overview
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
HTML5 Semantics, Accessibility & Forms [Carsonified HTML5 Online Conference]
Getting Started with HTML5 in Tech Com (STC 2012)
Echo HTML5
HTML5 Intro

What's hot (20)

PPTX
Html5 and web technology update
PPSX
Introduction to Html5
PDF
Repaso rápido a los nuevos estándares web
PDF
Developing jQuery Plugins with Ease
PDF
Introduction to web components
PDF
Progressive Enhancement with JavaScript and Ajax
KEY
HTML 5 & CSS 3
PDF
What you need to know bout html5
KEY
Plone Interactivity
PDF
Google’s PRPL Web development pattern
PDF
Netvibes UWA workshop at ParisWeb 2007
PDF
jQuery Mobile & PhoneGap
PPTX
Open Source Ajax Solution @OSDC.tw 2009
PDF
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
PDF
Ditching jQuery Madison
PDF
Html5 ux london
PDF
Progressive Prototyping w/HTML5, CSS3 and jQuery
PDF
Prototyping w/HTML5 and CSS3
PPT
JavaScript Training
PDF
Web Projects: From Theory To Practice
Html5 and web technology update
Introduction to Html5
Repaso rápido a los nuevos estándares web
Developing jQuery Plugins with Ease
Introduction to web components
Progressive Enhancement with JavaScript and Ajax
HTML 5 & CSS 3
What you need to know bout html5
Plone Interactivity
Google’s PRPL Web development pattern
Netvibes UWA workshop at ParisWeb 2007
jQuery Mobile & PhoneGap
Open Source Ajax Solution @OSDC.tw 2009
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
Ditching jQuery Madison
Html5 ux london
Progressive Prototyping w/HTML5, CSS3 and jQuery
Prototyping w/HTML5 and CSS3
JavaScript Training
Web Projects: From Theory To Practice
Ad

Viewers also liked (20)

PDF
Aspekty prawne monitorowania aktywności użytkowników komputerów firmowych
PPT
John wood social entrepreneur
PDF
Siker képekben - John Maxwell nyomán
PDF
Manejo alimentar de peixes98 (1)
PPT
AMA Phoenix -- Delivering Happiness | 11.02.10
PPT
Program metamorfosis juara rv2
PPTX
Saint presentation
PDF
Presentation global 20111124_rev03
PPTX
My Music Video Plan
PDF
Secure remote access in solaris 9
PPTX
Sapuki sig 2013
PPT
John wood social entrepreneur
PPT
Xara thessaloniki
PPTX
asi se voto
PPTX
A2 d laser
PPTX
HPMC - Mission Ministry Team
PPT
Afroditi
PPT
Presentation1
PPTX
Women's Rights
Aspekty prawne monitorowania aktywności użytkowników komputerów firmowych
John wood social entrepreneur
Siker képekben - John Maxwell nyomán
Manejo alimentar de peixes98 (1)
AMA Phoenix -- Delivering Happiness | 11.02.10
Program metamorfosis juara rv2
Saint presentation
Presentation global 20111124_rev03
My Music Video Plan
Secure remote access in solaris 9
Sapuki sig 2013
John wood social entrepreneur
Xara thessaloniki
asi se voto
A2 d laser
HPMC - Mission Ministry Team
Afroditi
Presentation1
Women's Rights
Ad

Similar to html5 (20)

PDF
HTML5: Introduction
PDF
Dive Into HTML5
KEY
WHAT IS HTML5? (at CSS Nite Osaka)
PDF
Change by HTML5
PPTX
Html5 & less css
ZIP
Html5 public
PDF
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
KEY
Introduction to HTML5/CSS3 In Drupal 7
PPTX
HTML5: An Overview
PDF
HTML5: An Introduction To Next Generation Web Development
PPTX
HTML5 introduction for beginners
PPT
HTML5 Webinar - Mind Storm Software
KEY
Html5 Primer
PDF
Building a Better Web with HTML5 and CSS3
PPTX
HTML5 and CSS3 Techniques You Can Use Today
PPTX
HTML 5 - A developers perspective
KEY
Ease into HTML5 and CSS3
PPT
HTML5: An Introduction To Next Generation Web Development
PPTX
What is HTML 5?
HTML5: Introduction
Dive Into HTML5
WHAT IS HTML5? (at CSS Nite Osaka)
Change by HTML5
Html5 & less css
Html5 public
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
Introduction to HTML5/CSS3 In Drupal 7
HTML5: An Overview
HTML5: An Introduction To Next Generation Web Development
HTML5 introduction for beginners
HTML5 Webinar - Mind Storm Software
Html5 Primer
Building a Better Web with HTML5 and CSS3
HTML5 and CSS3 Techniques You Can Use Today
HTML 5 - A developers perspective
Ease into HTML5 and CSS3
HTML5: An Introduction To Next Generation Web Development
What is HTML 5?

Recently uploaded (20)

PPT
Machine printing techniques and plangi dyeing
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PDF
Interior Structure and Construction A1 NGYANQI
PDF
SEVA- Fashion designing-Presentation.pdf
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
DOCX
The story of the first moon landing.docx
PDF
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
PDF
Urban Design Final Project-Site Analysis
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
DOCX
actividad 20% informatica microsoft project
PDF
Quality Control Management for RMG, Level- 4, Certificate
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPTX
rapid fire quiz in your house is your india.pptx
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPTX
Tenders & Contracts Works _ Services Afzal.pptx
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PPTX
CLASS_11_BUSINESS_STUDIES_PPT_CHAPTER_1_Business_Trade_Commerce.pptx
PDF
BRANDBOOK-Presidential Award Scheme-Kenya-2023
Machine printing techniques and plangi dyeing
YOW2022-BNE-MinimalViableArchitecture.pdf
Interior Structure and Construction A1 NGYANQI
SEVA- Fashion designing-Presentation.pdf
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
The story of the first moon landing.docx
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
Urban Design Final Project-Site Analysis
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
actividad 20% informatica microsoft project
Quality Control Management for RMG, Level- 4, Certificate
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
rapid fire quiz in your house is your india.pptx
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
Tenders & Contracts Works _ Services Afzal.pptx
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
CLASS_11_BUSINESS_STUDIES_PPT_CHAPTER_1_Business_Trade_Commerce.pptx
BRANDBOOK-Presidential Award Scheme-Kenya-2023

html5