SlideShare a Scribd company logo
HTML5
By Yaowaluck Promdee, Dr.Sumonta Kasemvilas
Index
What’s HTML5
New Selectors
New Properties
Animations
2D/3D
https://www.youtube.com/watch?v=mzPxo7Y6JyA
What’s HTML5?
New HTML5 Elements
New Semantic/Structural Elements
Tag Description
<article>
<aside>
<bdi>
<details>
<dialog>
<figcaption>
Defines an article in the document
Defines content aside from the page
content
Defines a part of text that might be
formatted in a different direction from
other text
Defines a dialog box or window
Defines a caption for a <figure>
element
<figure> Defines self-contained
content, like illustrations, diagrams,
photos, code listings, etc.
New Semantic/Structural Elements
Tag Description
<footer>
<header>
<main>
<mark>
<menuitem>
<meter>
Defines a footer for the document or a
section
Defines a header for the document or a
section
Defines the main content of a document
Defines marked or highlighted text
Defines a command/menu item that the
user can invoke from a popup menu
Defines a scalar measurement within a
known range (a gauge)
New Semantic/Structural Elements
Tag Description
<nav>
<progress>
<rp>
<rt>
<ruby>
<section>
<summary>
<time>
<wbr>
Defines navigation links in the document
Defines the progress of a task
Defines what to show in browsers that do
not support ruby annotations
Defines an explanation/pronunciation of
characters (for East Asian typography)
Defines a section in the document
Defines a visible heading for a <details>
element
Defines a date/time
Defines a possible line-break
New Form Elements
Tag Description
<datalist>
<keygen>
<output>
Defines pre-defined options for input
controls
Defines a key-pair generator field (for
forms)
Defines the result of a calculation
New Media Elements
Tag Description
<audio>
<embed>
<source>
<track>
<video>
Defines sound or music content
Defines containers for external
applications (like plug-ins)
Defines sources for <video> and
<audio>
Defines sources for <video> and
<audio>
Defines video or movie content
HTML4 vs HTML5
HTML4
<div id=“header”>
<div id=“menu”>
<div id =“content”>
<div id=“post”>
<div id=“footer”>
HTML5
<header>
<nav>
<section>
<article>
<footer>
Example1 div
Example1 div
Example2 HTML5
Try it! HTML5
Image Attribute
<img src=“imagename.png” alt=“HTML5”
style=“width:300px;height:300px”>
Adding New Element to HTML
<script>document.createElement(“myCode”)</script>
<style>
myCode
{
display:block;
background-color:#ddd;
padding: 50px;
font-size: 30px;
}
</style>
You can also add any new element to HTML with a browser trick.
This example adds a new element called <myCode> to HTML, and defines
a display style for it >>
<myCode>Adding New Element to HTML</myCode>
HTML Canvas
<canvas id="myCanvas"
width="200" height="100"
style="border:1px solid
#000000;">
Your browser does not support
the HTML5 canvas tag.
</canvas>
Result:
HTML Canvas (Cont.)
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(0,0,150,75);
</script>
Result:
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.moveTo(0,0);
ctx.lineTo(200,100);
ctx.stroke();
</script>
Result:
x, y, width, height
HTML Canvas (Cont.)
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.arc(95,50,40,0,2*Math.PI);
ctx.stroke();
</script>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.font = "30px Arial";
ctx.fillText("Hello World",10,50);
</script>
HTML with Video/Audio
<video width="400" controls>
<source src=“videofile.mp4” type="video/mp4">
<source src=“videofile.ogg” type="video/ogg">
Your browser does not support HTML5 video.
</video>
Assignment#2
Write HTML Code following the figure using HTML5
Canvas
Video
Image
Canvas

More Related Content

PDF
Style and Selector Part2
PPTX
Overview HTML, HTML5 and Validations
PDF
Style and Selector
PDF
Lab#5 style and selector
PDF
CSS Font & Text style
PDF
Tables and forms with HTML, CSS
PDF
CSS3 Introduction
PPTX
Html - By Auroskkil
Style and Selector Part2
Overview HTML, HTML5 and Validations
Style and Selector
Lab#5 style and selector
CSS Font & Text style
Tables and forms with HTML, CSS
CSS3 Introduction
Html - By Auroskkil

What's hot (20)

PPT
1. introduction to html5
PPTX
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
PDF
HTML/CSS Crash Course (april 4 2017)
PPT
HTML 5 Complete Reference
PDF
CSS-3 Course Slide
PPT
Chapter 4a cascade style sheet css
PPTX
HTML CSS | Computer Science
PPTX
Web designing (2) - CSS Basic Coding
PPTX
Introduction to whats new in css3
PPSX
Introduction to Html5
PPTX
Web designing (1) - Html Basic Codding
PPTX
Hypertext markup language(html)
PPTX
web development basics tables part2
PDF
Getting Information through HTML Forms
PDF
CSS Foundations, pt 2
PPTX
Coding a Website with HTML
PPTX
HTML, CSS And JAVASCRIPT!
PDF
Web Design Course: CSS lecture 1
PPTX
FYBSC IT Web Programming Unit I HTML 5 & andcss
PPTX
HTML/CSS/java Script/Jquery
1. introduction to html5
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
HTML/CSS Crash Course (april 4 2017)
HTML 5 Complete Reference
CSS-3 Course Slide
Chapter 4a cascade style sheet css
HTML CSS | Computer Science
Web designing (2) - CSS Basic Coding
Introduction to whats new in css3
Introduction to Html5
Web designing (1) - Html Basic Codding
Hypertext markup language(html)
web development basics tables part2
Getting Information through HTML Forms
CSS Foundations, pt 2
Coding a Website with HTML
HTML, CSS And JAVASCRIPT!
Web Design Course: CSS lecture 1
FYBSC IT Web Programming Unit I HTML 5 & andcss
HTML/CSS/java Script/Jquery
Ad

Viewers also liked (7)

PPTX
Web Interface
PDF
Game design
PDF
Navigation and Link
PPTX
Bootstrap Framework
PPTX
Observation and interviewing
PPTX
Odoo Features | Opensource ERP | Odoo Ecommerce
PPTX
Odoo introduction
Web Interface
Game design
Navigation and Link
Bootstrap Framework
Observation and interviewing
Odoo Features | Opensource ERP | Odoo Ecommerce
Odoo introduction
Ad

Similar to HTML 5 (20)

PPTX
PPTX
HTML5.pptx
PPTX
Training HTML
PPTX
Introduction to html 5
PDF
Intro to html 5
PPTX
Html 5
PDF
html5 _ Fundamentals a Basic Concepts of Understanding HTML.pdf
PPTX
Delhi student's day
PDF
Html5 p resentation by techmodi
PDF
Introduction to html5
PPTX
Html5
PPTX
Html5
PPTX
Html5 shubelal
PPT
Brief on Html5
PPTX
HTML5-Tutorial-For-Beginn.6202488.pptx
PPTX
Html5 tutorial for beginners
PPTX
Hyper text markup language basic programming slides
PPTX
HTML 5 Fundamental
PDF
PPTX
HTML5 Tutorial
HTML5.pptx
Training HTML
Introduction to html 5
Intro to html 5
Html 5
html5 _ Fundamentals a Basic Concepts of Understanding HTML.pdf
Delhi student's day
Html5 p resentation by techmodi
Introduction to html5
Html5
Html5
Html5 shubelal
Brief on Html5
HTML5-Tutorial-For-Beginn.6202488.pptx
Html5 tutorial for beginners
Hyper text markup language basic programming slides
HTML 5 Fundamental
HTML5 Tutorial

More from Yaowaluck Promdee (20)

PDF
A basic of UX for beginner
PDF
PDF
Portfolio design
PDF
Concept to creation story and storyboard
PPTX
Requirement gathering-and-lean-canvas
PDF
Good bad design
PDF
Graphic, Color and tools
PPTX
Page layouts flexible and fixed layout with CSS
PDF
CSS Boc model
PPTX
Design sitemap
PPTX
Good/Bad Web Design
PPTX
Powerpoint
PDF
Program Interface
PDF
Mobile Interface
PDF
Personas and scenario
PPTX
Ux design process
PDF
Graphic Design
PDF
Lab#2 illustrator
PDF
Good/Bad Design
PPTX
Content management system
A basic of UX for beginner
Portfolio design
Concept to creation story and storyboard
Requirement gathering-and-lean-canvas
Good bad design
Graphic, Color and tools
Page layouts flexible and fixed layout with CSS
CSS Boc model
Design sitemap
Good/Bad Web Design
Powerpoint
Program Interface
Mobile Interface
Personas and scenario
Ux design process
Graphic Design
Lab#2 illustrator
Good/Bad Design
Content management system

Recently uploaded (20)

PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PDF
advance database management system book.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
Trump Administration's workforce development strategy
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
Computer Architecture Input Output Memory.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
Introduction to Building Materials
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Unit 4 Computer Architecture Multicore Processor.pptx
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
Hazard Identification & Risk Assessment .pdf
advance database management system book.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Trump Administration's workforce development strategy
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
B.Sc. DS Unit 2 Software Engineering.pptx
Computer Architecture Input Output Memory.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Introduction to Building Materials
History, Philosophy and sociology of education (1).pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS

HTML 5

  • 1. HTML5 By Yaowaluck Promdee, Dr.Sumonta Kasemvilas
  • 2. Index What’s HTML5 New Selectors New Properties Animations 2D/3D
  • 5. New Semantic/Structural Elements Tag Description <article> <aside> <bdi> <details> <dialog> <figcaption> Defines an article in the document Defines content aside from the page content Defines a part of text that might be formatted in a different direction from other text Defines a dialog box or window Defines a caption for a <figure> element <figure> Defines self-contained content, like illustrations, diagrams, photos, code listings, etc.
  • 6. New Semantic/Structural Elements Tag Description <footer> <header> <main> <mark> <menuitem> <meter> Defines a footer for the document or a section Defines a header for the document or a section Defines the main content of a document Defines marked or highlighted text Defines a command/menu item that the user can invoke from a popup menu Defines a scalar measurement within a known range (a gauge)
  • 7. New Semantic/Structural Elements Tag Description <nav> <progress> <rp> <rt> <ruby> <section> <summary> <time> <wbr> Defines navigation links in the document Defines the progress of a task Defines what to show in browsers that do not support ruby annotations Defines an explanation/pronunciation of characters (for East Asian typography) Defines a section in the document Defines a visible heading for a <details> element Defines a date/time Defines a possible line-break
  • 8. New Form Elements Tag Description <datalist> <keygen> <output> Defines pre-defined options for input controls Defines a key-pair generator field (for forms) Defines the result of a calculation
  • 9. New Media Elements Tag Description <audio> <embed> <source> <track> <video> Defines sound or music content Defines containers for external applications (like plug-ins) Defines sources for <video> and <audio> Defines sources for <video> and <audio> Defines video or movie content
  • 10. HTML4 vs HTML5 HTML4 <div id=“header”> <div id=“menu”> <div id =“content”> <div id=“post”> <div id=“footer”> HTML5 <header> <nav> <section> <article> <footer>
  • 14. Image Attribute <img src=“imagename.png” alt=“HTML5” style=“width:300px;height:300px”>
  • 15. Adding New Element to HTML <script>document.createElement(“myCode”)</script> <style> myCode { display:block; background-color:#ddd; padding: 50px; font-size: 30px; } </style> You can also add any new element to HTML with a browser trick. This example adds a new element called <myCode> to HTML, and defines a display style for it >> <myCode>Adding New Element to HTML</myCode>
  • 16. HTML Canvas <canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;"> Your browser does not support the HTML5 canvas tag. </canvas> Result:
  • 17. HTML Canvas (Cont.) <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.fillStyle = "#FF0000"; ctx.fillRect(0,0,150,75); </script> Result: <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.moveTo(0,0); ctx.lineTo(200,100); ctx.stroke(); </script> Result: x, y, width, height
  • 18. HTML Canvas (Cont.) <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.beginPath(); ctx.arc(95,50,40,0,2*Math.PI); ctx.stroke(); </script> <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.font = "30px Arial"; ctx.fillText("Hello World",10,50); </script>
  • 19. HTML with Video/Audio <video width="400" controls> <source src=“videofile.mp4” type="video/mp4"> <source src=“videofile.ogg” type="video/ogg"> Your browser does not support HTML5 video. </video>
  • 20. Assignment#2 Write HTML Code following the figure using HTML5 Canvas Video Image Canvas