RANDOM HTML 5 STUFF: INTRODUCTION TO HTML5 This document is created when I was creating a video and was typing. Just improved by little bit, not much HTML is not rocket science.. Anyway, HTML5 Any application, having web-based user interface, in general, will use HTML HTML5 is the most recent version of HTML.. Just an example of HTML5 document structure... 2022-02-14 1 [email protected]
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
HTML 5 So you can see the structure of a well structured
HTML5 document view-source:http://www.justetc.net/ It is kind of modified than I showed in the video
The doctype <!DOCTYPE html> is simple Previously you had transitional, strict, loose... Loose-> do not care for perfectness that much Transitional -> better, somewhat
forgiving...usually the common choice Strict -> your HTML need to be perfect...
SUPPORTING HTML 5 TAGS FOR IE VERSIONS <!--[if lt IE 8]> <div style=' clear: both; text-align:center; position: relative;'> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/
ie/home?ocid=ie6_countdown_bannercode"> <img
src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
HTML 5 DOCUMENT OUTLINE/STRUCTURE In HTML5, nav, header, footer do not belong to the
content but to the whole site nav, header, footer are not for content...as the name says
For browsers, other than IE, if they do not support HTML5 yet, we can just create the following CSS classes to make the new tags known section, article, aside, footer, header, nav, hgroup
{ display:block; } For IE and versions less than 9, we need to create the
As the article on the left tells, some new HTML 5 tags are <nav>: for navigation menu, is not part of content , <header>, to define header section, does not
belong to content <footer>, to define footer section, does not belong
to content and <figure>: to show figure in the content area
You can use figcaption to define the caption of the figure Figure, diagrams, and similar
<img src="/macaque.jpg" alt="Macaque in the trees"> <figcaption>A cheeky macaque, Lower Kintaganban River, Borneo. Original by <ahref="http://www.flickr.com/photos/rclark/">Richard Clark</a></figcaption></figure>
HTML5 SERVER-SENT EVENTS Servers can push data Remote scripts sending updates How to check if the browser supports it or not SSE is supported by all major browsers except
Internet Explorer. if(typeof(EventSource)!=="undefined") { // Yes! } else { // Sorry! No }
The code to check for browser support for other similar HTML 5 features will also be similar to the above code
In HTML5, you can use SVG tag to include vector graphics. SVG defines graphics in xml format. Vector Graphics are independent of resolution, can have events, can be manipulated without being redrawn
Vector graphics are good in the sense that quality does not degrade with resolution changes
var c=document.getElementById("canvas_id"); var ctx=c.getContext("2d"); //java like drawing...ctx.fillStyle="#FFFF00"; ctx.fillRect(0,0,200,100); </script>
WAS SHOWING A DEMO HTML 5 SITE This is a HTML site... type="email“ is used It used iframe for video Did not use video tag.. You can find some HTML5 and video tag related
custom library Tried such control in a project Though playing in phone was pretty slow...probably it
was not even showing up...anyway..later the requirements changed and no further work were done on that