The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag-and-drop functionality. It also covers HTML5 document structure, elements, attributes, events, and forms improvements in Web Forms 2.0.
The document provides an overview of HTML5, including its new features such as video playback without plugins, new semantic elements like <header> and <footer>, and support across modern browsers. It discusses HTML5's backwards compatibility and flexible syntax compared to previous HTML standards. New elements, attributes, and document structure in HTML5 are also outlined.
The document provides an overview of HTML5, including its new features such as video playback without plugins, new semantic elements like <header> and <footer>, and support across modern browsers. It discusses HTML5 elements, attributes, syntax, and document structure. New elements help build modern websites, while attributes like class and id can be used to style and identify elements. HTML5 aims to be backwards compatible with older browsers.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag-and-drop functionality. It also covers HTML5 document structure, elements, attributes, events, and forms improvements in Web Forms 2.0.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag and drop functionality. It also covers HTML5 syntax changes like the new DOCTYPE declaration and provides examples of using various HTML5 elements, attributes, and events in web pages.
The document provides an overview of HTML5, including new features such as video playback, drag-and-drop, local storage, web sockets, and more. It discusses browser support for HTML5, new semantic elements like <header> and <footer>, forms improvements, and the updated syntax of HTML5 which is more flexible than previous standards. The document is a tutorial for HTML5 from TutorialsPoint that aims to give readers a good understanding of the latest capabilities and structure of HTML5.
The document provides an overview of HTML5, including new features such as video playback, drag-and-drop, local storage and geolocation. It discusses HTML5 syntax, elements, attributes, forms, and events. Key points include HTML5 being the latest version that incorporates features previously requiring plugins, improved form handling, and new semantic elements like <header> and <section>. Browser support for HTML5 is good among modern browsers.
HTML5 Deciphered discusses HTML5 specifications and their development process. It introduces several new HTML5 elements such as <header>, <footer>, <nav>, <aside>, and <section> that provide semantic structure. It also covers new input types, native audio and video, geolocation, and the canvas element for drawing graphics. The document explains how these new features work and their current browser support.
This document provides an overview of the basic structure and elements of an HTML5 template. It begins with a barebones template containing the doctype, html, head and body elements. The doctype has been simplified in HTML5 to just <!doctype html>. Several elements in the head like the character encoding and stylesheet link have also been simplified. The template includes an HTML5 shiv to provide support for new HTML5 elements in older browsers. The document explains each part of the template.
HTML5 is the next revision of the HTML standard that incorporates new features like video playback and drag-and-drop without plugins. It introduces new elements like <header>, <footer>, and <section> and features such as canvas drawing, audio/video embedding, geolocation, and web sockets. HTML5 is designed to be backward compatible and uses simpler document structures and tags than previous versions.
- HTML5 is the newest version of HTML that incorporates features from earlier versions and adds new tools for web developers.
- It aims to reduce the need for plugins, improve semantic markup, and make rendering universal across devices.
- Key changes in HTML5 include a simplified DOCTYPE, new semantic elements like <header> and <footer>, built-in support for audio/video without plugins, and advanced features like the Canvas element.
- HTML5 is the newest version of HTML that began development in 2004 and was officially published in 2012.
- It incorporates features from prior HTML versions and adds new elements and features like built-in audio/video, canvas drawing, and offline web apps.
- HTML5 simplifies elements like DOCTYPE and <html> and removes unnecessary code like XML namespaces.
HTML 5, CSS3 and ASP.NET Best Practices by ExampleDarren Sim
HTML5 is not a single feature, but a collection of individual features such as canvas, video, and geolocation. While older browsers may not support HTML5, you can detect support for specific features through JavaScript APIs and the Document Object Model (DOM). Modernizr is an open source JavaScript library that detects support for HTML5 and CSS3 features to help provide alternative functionality where needed.
HTML5 is the newest version of HTML that simplifies elements and syntax compared to previous versions. It was first published in 2012 but has been in development since 2004. HTML5 incorporates features from earlier HTML versions and adds new tools for developers, though full browser support will take many years. The document provides examples of simplified DOCTYPE, HTML, HEAD, and BODY elements in HTML5 compared to previous versions like XHTML.
- HTML5 is the newest version of HTML that incorporates features from previous versions and adds new tools for web developers.
- It aims to reduce the need for plugins, improve semantic markup, and make rendering universal across devices.
- Key changes in HTML5 include a simplified DOCTYPE, new semantic elements like <header> and <footer>, built-in support for audio/video, and the canvas element for drawing.
HTML5 is the newest version of HTML that incorporates features from previous versions and adds new tools for web developers. It is still a work in progress with no full browser support expected until 2018. Key goals of HTML5 include supporting existing pages, reducing need for plugins, improving semantic meaning of elements, and making rendering universal across devices. New elements were introduced and features like audio, video, Canvas, and offline apps are now supported within HTML5. The DOCTYPE and HTML declarations were also simplified for easier reading and writing of code.
HTML5 provides better cross-browser compatibility and support for web applications, rich text formatting, and offline storage capabilities. It introduces new semantic elements, APIs, and multimedia features like video and audio playback. While HTML5 has advantages, some browsers may require JavaScript to recognize new elements and full backwards compatibility has not been achieved.
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
The document compares HTML and HTML5. It outlines several key differences:
1) HTML5 introduces new semantic elements that improve accessibility and help structure pages, while HTML focuses on generic div elements.
2) HTML5 supports embedded audio and video with new tags, whereas HTML4 does not define media elements.
3) HTML5 offers new capabilities like local storage, geolocation, and real-time communication that HTML lacks.
Overall, HTML5 provides a more robust and accessible standard for developing modern web applications and pages compared to older HTML. It introduces powerful new features while maintaining compatibility with existing browsers.
This is a brief introduction about HTML5. You will learn that what is new in HTML5. I will tell what and when changes happened in HTML which Hyper Text markup language. Html is a language which is used to create web pages that we have seen on the internet. For website development and web hosting visit https://tekfold.com
The document provides an overview of HTML including:
1) A brief history of HTML from its origins in the 1960s through its standardization by the W3C in the late 1990s.
2) An explanation of HTML syntax including tags, elements, attributes, and nesting.
3) A discussion of semantic markup and its advantages over presentation-oriented markup.
4) A description of the basic structure of an HTML document including the DOCTYPE, html, head, and body elements.
5) A quick tour of common HTML elements like headings, paragraphs, links, and divisions.
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
HTML is a markup language that allows users to structure and format web pages. It uses tags like <p> and <div> to organize content into sections, paragraphs, headings, and other blocks. While HTML provides structure, CSS and JavaScript are needed to style pages and add dynamic functionality. HTML files are rendered and displayed in web browsers.
Title: A Quick and Illustrated Guide to APA Style Referencing (7th Edition)
This visual and beginner-friendly guide simplifies the APA referencing style (7th edition) for academic writing. Designed especially for commerce students and research beginners, it includes:
✅ Real examples from original research papers
✅ Color-coded diagrams for clarity
✅ Key rules for in-text citation and reference list formatting
✅ Free citation tools like Mendeley & Zotero explained
Whether you're writing a college assignment, dissertation, or academic article, this guide will help you cite your sources correctly, confidently, and consistent.
Created by: Prof. Ishika Ghosh,
Faculty.
📩 For queries or feedback: [email protected]
Ad
More Related Content
Similar to html5 _ Fundamentals a Basic Concepts of Understanding HTML.pdf (20)
This document provides an overview of the basic structure and elements of an HTML5 template. It begins with a barebones template containing the doctype, html, head and body elements. The doctype has been simplified in HTML5 to just <!doctype html>. Several elements in the head like the character encoding and stylesheet link have also been simplified. The template includes an HTML5 shiv to provide support for new HTML5 elements in older browsers. The document explains each part of the template.
HTML5 is the next revision of the HTML standard that incorporates new features like video playback and drag-and-drop without plugins. It introduces new elements like <header>, <footer>, and <section> and features such as canvas drawing, audio/video embedding, geolocation, and web sockets. HTML5 is designed to be backward compatible and uses simpler document structures and tags than previous versions.
- HTML5 is the newest version of HTML that incorporates features from earlier versions and adds new tools for web developers.
- It aims to reduce the need for plugins, improve semantic markup, and make rendering universal across devices.
- Key changes in HTML5 include a simplified DOCTYPE, new semantic elements like <header> and <footer>, built-in support for audio/video without plugins, and advanced features like the Canvas element.
- HTML5 is the newest version of HTML that began development in 2004 and was officially published in 2012.
- It incorporates features from prior HTML versions and adds new elements and features like built-in audio/video, canvas drawing, and offline web apps.
- HTML5 simplifies elements like DOCTYPE and <html> and removes unnecessary code like XML namespaces.
HTML 5, CSS3 and ASP.NET Best Practices by ExampleDarren Sim
HTML5 is not a single feature, but a collection of individual features such as canvas, video, and geolocation. While older browsers may not support HTML5, you can detect support for specific features through JavaScript APIs and the Document Object Model (DOM). Modernizr is an open source JavaScript library that detects support for HTML5 and CSS3 features to help provide alternative functionality where needed.
HTML5 is the newest version of HTML that simplifies elements and syntax compared to previous versions. It was first published in 2012 but has been in development since 2004. HTML5 incorporates features from earlier HTML versions and adds new tools for developers, though full browser support will take many years. The document provides examples of simplified DOCTYPE, HTML, HEAD, and BODY elements in HTML5 compared to previous versions like XHTML.
- HTML5 is the newest version of HTML that incorporates features from previous versions and adds new tools for web developers.
- It aims to reduce the need for plugins, improve semantic markup, and make rendering universal across devices.
- Key changes in HTML5 include a simplified DOCTYPE, new semantic elements like <header> and <footer>, built-in support for audio/video, and the canvas element for drawing.
HTML5 is the newest version of HTML that incorporates features from previous versions and adds new tools for web developers. It is still a work in progress with no full browser support expected until 2018. Key goals of HTML5 include supporting existing pages, reducing need for plugins, improving semantic meaning of elements, and making rendering universal across devices. New elements were introduced and features like audio, video, Canvas, and offline apps are now supported within HTML5. The DOCTYPE and HTML declarations were also simplified for easier reading and writing of code.
HTML5 provides better cross-browser compatibility and support for web applications, rich text formatting, and offline storage capabilities. It introduces new semantic elements, APIs, and multimedia features like video and audio playback. While HTML5 has advantages, some browsers may require JavaScript to recognize new elements and full backwards compatibility has not been achieved.
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
The document compares HTML and HTML5. It outlines several key differences:
1) HTML5 introduces new semantic elements that improve accessibility and help structure pages, while HTML focuses on generic div elements.
2) HTML5 supports embedded audio and video with new tags, whereas HTML4 does not define media elements.
3) HTML5 offers new capabilities like local storage, geolocation, and real-time communication that HTML lacks.
Overall, HTML5 provides a more robust and accessible standard for developing modern web applications and pages compared to older HTML. It introduces powerful new features while maintaining compatibility with existing browsers.
This is a brief introduction about HTML5. You will learn that what is new in HTML5. I will tell what and when changes happened in HTML which Hyper Text markup language. Html is a language which is used to create web pages that we have seen on the internet. For website development and web hosting visit https://tekfold.com
The document provides an overview of HTML including:
1) A brief history of HTML from its origins in the 1960s through its standardization by the W3C in the late 1990s.
2) An explanation of HTML syntax including tags, elements, attributes, and nesting.
3) A discussion of semantic markup and its advantages over presentation-oriented markup.
4) A description of the basic structure of an HTML document including the DOCTYPE, html, head, and body elements.
5) A quick tour of common HTML elements like headings, paragraphs, links, and divisions.
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
HTML is a markup language that allows users to structure and format web pages. It uses tags like <p> and <div> to organize content into sections, paragraphs, headings, and other blocks. While HTML provides structure, CSS and JavaScript are needed to style pages and add dynamic functionality. HTML files are rendered and displayed in web browsers.
Title: A Quick and Illustrated Guide to APA Style Referencing (7th Edition)
This visual and beginner-friendly guide simplifies the APA referencing style (7th edition) for academic writing. Designed especially for commerce students and research beginners, it includes:
✅ Real examples from original research papers
✅ Color-coded diagrams for clarity
✅ Key rules for in-text citation and reference list formatting
✅ Free citation tools like Mendeley & Zotero explained
Whether you're writing a college assignment, dissertation, or academic article, this guide will help you cite your sources correctly, confidently, and consistent.
Created by: Prof. Ishika Ghosh,
Faculty.
📩 For queries or feedback: [email protected]
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingCeline George
The Accounting module in Odoo 17 is a complete tool designed to manage all financial aspects of a business. Odoo offers a comprehensive set of tools for generating financial and tax reports, which are crucial for managing a company's finances and ensuring compliance with tax regulations.
A measles outbreak originating in West Texas has been linked to confirmed cases in New Mexico, with additional cases reported in Oklahoma and Kansas. The current case count is 817 from Texas, New Mexico, Oklahoma, and Kansas. 97 individuals have required hospitalization, and 3 deaths, 2 children in Texas and one adult in New Mexico. These fatalities mark the first measles-related deaths in the United States since 2015 and the first pediatric measles death since 2003.
The YSPH Virtual Medical Operations Center Briefs (VMOC) were created as a service-learning project by faculty and graduate students at the Yale School of Public Health in response to the 2010 Haiti Earthquake. Each year, the VMOC Briefs are produced by students enrolled in Environmental Health Science Course 581 - Public Health Emergencies: Disaster Planning and Response. These briefs compile diverse information sources – including status reports, maps, news articles, and web content– into a single, easily digestible document that can be widely shared and used interactively. Key features of this report include:
- Comprehensive Overview: Provides situation updates, maps, relevant news, and web resources.
- Accessibility: Designed for easy reading, wide distribution, and interactive use.
- Collaboration: The “unlocked" format enables other responders to share, copy, and adapt seamlessly. The students learn by doing, quickly discovering how and where to find critical information and presenting it in an easily understood manner.
CURRENT CASE COUNT: 817 (As of 05/3/2025)
• Texas: 688 (+20)(62% of these cases are in Gaines County).
• New Mexico: 67 (+1 )(92.4% of the cases are from Eddy County)
• Oklahoma: 16 (+1)
• Kansas: 46 (32% of the cases are from Gray County)
HOSPITALIZATIONS: 97 (+2)
• Texas: 89 (+2) - This is 13.02% of all TX cases.
• New Mexico: 7 - This is 10.6% of all NM cases.
• Kansas: 1 - This is 2.7% of all KS cases.
DEATHS: 3
• Texas: 2 – This is 0.31% of all cases
• New Mexico: 1 – This is 1.54% of all cases
US NATIONAL CASE COUNT: 967 (Confirmed and suspected):
INTERNATIONAL SPREAD (As of 4/2/2025)
• Mexico – 865 (+58)
‒Chihuahua, Mexico: 844 (+58) cases, 3 hospitalizations, 1 fatality
• Canada: 1531 (+270) (This reflects Ontario's Outbreak, which began 11/24)
‒Ontario, Canada – 1243 (+223) cases, 84 hospitalizations.
• Europe: 6,814
As of Mid to April Ending, I am building a new Reiki-Yoga Series. No worries, they are free workshops. So far, I have 3 presentations so its a gradual process. If interested visit: https://www.slideshare.net/YogaPrincess
https://ldmchapels.weebly.com
Blessings and Happy Spring. We are hitting Mid Season.
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsesushreesangita003
what is pulse ?
Purpose
physiology and Regulation of pulse
Characteristics of pulse
factors affecting pulse
Sites of pulse
Alteration of pulse
for BSC Nursing 1st semester
for Gnm Nursing 1st year
Students .
vitalsign
INTRO TO STATISTICS
INTRO TO SPSS INTERFACE
CLEANING MULTIPLE CHOICE RESPONSE DATA WITH EXCEL
ANALYZING MULTIPLE CHOICE RESPONSE DATA
INTERPRETATION
Q & A SESSION
PRACTICAL HANDS-ON ACTIVITY
How to Subscribe Newsletter From Odoo 18 WebsiteCeline George
Newsletter is a powerful tool that effectively manage the email marketing . It allows us to send professional looking HTML formatted emails. Under the Mailing Lists in Email Marketing we can find all the Newsletter.
How to manage Multiple Warehouses for multiple floors in odoo point of saleCeline George
The need for multiple warehouses and effective inventory management is crucial for companies aiming to optimize their operations, enhance customer satisfaction, and maintain a competitive edge.
How to Set warnings for invoicing specific customers in odooCeline George
Odoo 16 offers a powerful platform for managing sales documents and invoicing efficiently. One of its standout features is the ability to set warnings and block messages for specific customers during the invoicing process.
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsDrNidhiAgarwal
Unemployment is a major social problem, by which not only rural population have suffered but also urban population are suffered while they are literate having good qualification.The evil consequences like poverty, frustration, revolution
result in crimes and social disorganization. Therefore, it is
necessary that all efforts be made to have maximum.
employment facilities. The Government of India has already
announced that the question of payment of unemployment
allowance cannot be considered in India
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsDrNidhiAgarwal
Ad
html5 _ Fundamentals a Basic Concepts of Understanding HTML.pdf
1. HTML5
9
HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML
1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the
World Wide Web.
HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web
Hypertext Application Technology Working Group (WHATWG).
The new standard incorporates features like video playback and drag-and-drop that have
been previously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft
Silverlight, and Google Gears.
BrowserSupport
The latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support
many HTML5 features and Internet Explorer 9.0 will also have support for some HTML5
functionality.
The mobile web browsers that come pre-installed on iPhones, iPads, and Android phones
all have excellent support for HTML5.
NewFeatures
HTML5 introduces a number of new elements and attributes that can help you in building
modern websites. Here is a set of some of the most prominent features introduced in
HTML5.
New Semantic Elements: These are like <header>, <footer>, and <section>.
Forms 2.0: Improvements to HTML web forms where new attributes have been
introduced for <input> tag.
Persistent Local Storage: To achieve without resorting to third-party plugins.
WebSocket : A next-generation bidirectional communication technology for web
applications.
Server-Sent Events: HTML5 introduces events which flow from web server to the
web browsers and they are called Server-Sent Events (SSE).
Canvas: This supports a two-dimensional drawing surface that you can program
with JavaScript.
Audio & Video: You can embed audio or video on your webpages without resorting
to third-party plugins.
Geolocation: Now visitors can choose to share their physical location with your
web application.
1. HTML5 − Overview
2. HTML5
10
Microdata: This lets you create your own vocabularies beyond HTML5 and extend
your web pages with custom semantics.
Drag and drop: Drag and drop the items from one location to another location on
the same webpage.
BackwardCompatibility
HTML5 is designed, as much as possible, to be backward compatible with existing web
browsers. Its new features have been built on existing features and allow you to provide
fallback content for older browsers.
It is suggested to detect support for individual HTML5 features using a few lines of
JavaScript.
If you are not familiar with any previous version of HTML, I would recommend that you go
through our HTML Tutorial before exploring the features of HTML5.
3. HTML5
11
The HTML 5 language has a "custom" HTML syntax that is compatible with HTML 4 and
XHTML1 documents published on the Web, but is not compatible with the more esoteric
SGML features of HTML 4.
HTML 5 does not have the same syntax rules as XHTML where we needed lower case tag
names, quoting our attributes, an attribute had to have a value and to close all empty
elements.
HTML5 comes with a lot of flexibility and it supports the following features −
Uppercase tag names.
Quotes are optional for attributes.
Attribute values are optional.
Closing empty elements are optional.
TheDOCTYPE
DOCTYPEs in older versions of HTML were longer because the HTML language was SGML
based and therefore required a reference to a DTD.
HTML 5 authors would use simple syntax to specify DOCTYPE as follows:
<!DOCTYPE html>
The above syntax is case-insensitive.
CharacterEncoding
HTML 5 authors can use simple syntax to specify Character Encoding as follows −
<meta charset="UTF-8">
The above syntax is case-insensitive.
The<script>tag
It's common practice to add a type attribute with a value of "text/javascript" to script
elements as follows −
<script type="text/javascript" src="scriptfile.js"></script>
HTML 5 removes extra information required and you can use simply following syntax −
<script src="scriptfile.js"></script>
2. HTML5 − Syntax
4. HTML5
12
The<link>tag
So far you were writing <link> as follows −
<link rel="stylesheet" type="text/css" href="stylefile.css">
HTML 5 removes extra information required and you can simply use the following syntax
−
<link rel="stylesheet" href="stylefile.css">
HTML5Elements
HTML5 elements are marked up using start tags and end tags. Tags are delimited using
angle brackets with the tag name in between.
The difference between start tags and end tags is that the latter includes a slash before
the tag name.
Following is the example of an HTML5 element −
<p>...</p>
HTML5 tag names are case insensitive and may be written in all uppercase or mixed case,
although the most common convention is to stick with lowercase.
Most of the elements contain some content like <p>...</p> contains a paragraph. Some
elements, however, are forbidden from containing any content at all and these are known
as void elements. For example, br, hr, link, meta, etc.
Here is a complete list of HTML5 Elements.
HTML5Attributes
Elements may contain attributes that are used to set various properties of an element.
Some attributes are defined globally and can be used on any element, while others are
defined for specific elements only. All attributes have a name and a value and look like as
shown below in the example.
Following is the example of an HTML5 attribute which illustrates how to mark up a div
element with an attribute named class using a value of "example" −
<div class="example">...</div>
Attributes may only be specified within start tags and must never be used in end tags.
HTML5 attributes are case insensitive and may be written in all uppercase or mixed case,
although the most common convention is to stick with lowercase.
Here is a complete list of HTML5 Attributes.
5. HTML5
13
HTML5Document
The following tags have been introduced for better structure −
section: This tag represents a generic document or application section. It can be
used together with h1-h6 to indicate the document structure.
article: This tag represents an independent piece of content of a document, such
as a blog entry or newspaper article.
aside: This tag represents a piece of content that is only slightly related to the rest
of the page.
header: This tag represents the header of a section.
footer: This tag represents a footer for a section and can contain information about
the author, copyright information, et cetera.
nav: This tag represents a section of the document intended for navigation.
dialog: This tag can be used to mark up a conversation.
figure: This tag can be used to associate a caption together with some embedded
content, such as a graphic or video.
The markup for an HTML 5 document would look like the following −
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>...</title>
</head>
<body>
<header>...</header>
<nav>...</nav>
<article>
<section>
...
</section>
</article>
6. HTML5
14
<aside>...</aside>
<footer>...</footer>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>...</title>
</head>
<body>
<header role="banner">
<h1>HTML5 Document Structure Example</h1>
<p>This page should be tried in safari, chrome or Mozila.</p>
</header>
<nav>
<ul>
<li><a href="http://www.tutorialspoint.com/html">HTML
Tutorial</a></li>
<li><a href="http://www.tutorialspoint.com/css">CSS
Tutorial</a></li>
<li><a href="http://www.tutorialspoint.com/javascript">JavaScript
Tutorial</a></li>
</ul>
</nav>
<article>
<section>
<p>Once article can have multiple sections</p>
7. HTML5
15
</section>
</article>
<aside>
<p>This is aside part of the web page</p>
</aside>
<footer>
<p>Created by <a href="http://tutorialspoint.com/">Tutorials
Point</a></p>
</footer>
</body>
</html>
8. HTML5
16
As explained in the previous chapter, elements may contain attributes that are used to set
various properties of an element.
Some attributes are defined globally and can be used on any element, while others are
defined for specific elements only. All attributes have a name and a value and look like as
shown below in the example.
Following is the example of an HTML5 attributes which illustrates how to mark up a div
element with an attribute named class using a value of "example" −
<div class="example">...</div>
Attributes may only be specified within start tags and must never be used in end tags.
HTML5 attributes are case insensitive and may be written in all uppercase or mixed case,
although the most common convention is to stick with lowercase.
StandardAttributes
The attributes listed below are supported by almost all the HTML 5 tags.
Attribute Options Function
accesskey User Defined
Specifies a keyboard shortcut to access an
element.
align right, left, center Horizontally aligns tags
background URL
Places an background image behind an
element
bgcolor
numeric,
hexidecimal, RGB
values
Places a background color behind an element
class User Defined
Classifies an element for use with Cascading
Style Sheets.
contenteditable true, false
Specifies if the user can edit the element's
content or not.
contextmenu Menu id Specifies the context menu for an element.
data-XXXX User Defined
Custom attributes. Authors of a HTML
document can define their own attributes. Must
start with "data-".
draggable true,false, auto
Specifies whether or not a user is allowed to
drag an element.
3. HTML5 − Attributes
9. HTML5
17
height Numeric Value
Specifies the height of tables, images, or table
cells.
hidden hidden
Specifies whether element should be visible or
not.
id User Defined
Names an element for use with Cascading
Style Sheets.
item List of elements Used to group elements.
itemprop List of items Used to group items.
spellcheck true, false
Specifies if the element must have it's spelling
or grammar checked.
style CSS Style sheet Specifies an inline style for an element.
subject User define id Specifies the element's corresponding item.
tabindex Tab number Specifies the tab order of an element.
title User Defined "Pop-up" title for your elements.
valign top, middle, bottom Vertically aligns tags within an HTML element.
width Numeric Value
Specifies the width of tables, images, or table
cells.
For a complete list of HTML5 Tags and related attributes, please check our reference
to HTML5 Tags.
CustomAttributes
A new feature being introduced in HTML 5 is the addition of custom data attributes.
A custom data attribute starts with data- and would be named based on your requirement.
Here is a simple example –
<div class="example" data-subject="physics" data-level="complex">
...
</div>
The above code will be perfectly valid HTML5 with two custom attributes called data-
subject and data-level. You would be able to get the values of these attributes using
JavaScript APIs or CSS in similar way as you get for standard attributes.
10. HTML5
21
Web Forms 2.0 is an extension to the forms features found in HTML4. Form elements and
attributes in HTML5 provide a greater degree of semantic mark-up than HTML4 and free
us from a great deal of tedious scripting and styling that was required in HTML4.
The<input>elementinHTML4
HTML4 input elements use the type attribute to specify the data type.HTML4 provides
following types −
Type Description
text A free-form text field, nominally free of line breaks.
password
A free-form text field for sensitive information, nominally free of line
breaks.
checkbox A set of zero or more values from a predefined list.
radio An enumerated value.
submit A free form of button initiates form submission.
file An arbitrary file with a MIME type and optionally a file name.
image
A coordinate, relative to a particular image's size, with the extra semantic
that it must be the last value selected and initiates form submission.
hidden An arbitrary string that is not normally displayed to the user.
select An enumerated value, much like the radio type.
textarea A free-form text field, nominally with no line break restrictions.
button A free form of button which can initiates any event related to button.
Following is the simple example of using labels, radio buttons, and submit buttons −
...
<form action="http://example.com/cgiscript.pl" method="post">
<p>
<label for="firstname">first name: </label>
<input type="text" id="firstname"><br />
<label for="lastname">last name: </label>
5. HTML5 − Web Forms 2.0
11. HTML5
22
<input type="text" id="lastname"><br />
<label for="email">email: </label>
<input type="text" id="email"><br>
<input type="radio" name="sex" value="male"> Male<br>
<input type="radio" name="sex" value="female"> Female<br>
<input type="submit" value="send"> <input type="reset">
</p>
</form>
...
The<input>elementinHTML5
Apart from the above-mentioned attributes, HTML5 input elements introduced several new
values for the type attribute. These are listed below.
NOTE: Try all the following example using latest version of Opera browser.
Type Description
datetime
A date and time (year, month, day, hour, minute, second, fractions of a
second) encoded according to ISO 8601 with the time zone set to UTC.
datetime-
local
A date and time (year, month, day, hour, minute, second, fractions of a
second) encoded according to ISO 8601, with no time zone information.
date A date (year, month, day) encoded according to ISO 8601.
month A date consisting of a year and a month encoded according to ISO 8601.
week
A date consisting of a year and a week number encoded according to ISO
8601.
time
A time (hour, minute, seconds, fractional seconds) encoded according to
ISO 8601.
number
It accepts only numerical value. The step attribute specifies the precision,
defaulting to 1.
range
The range type is used for input fields that should contain a value from a
range of numbers.
email
It accepts only email value. This type is used for input fields that should
contain an e-mail address. If you try to submit a simple text, it forces to
enter only email address in [email protected] format.
url It accepts only URL value. This type is used for input fields that should
contain a URL address. If you try to submit a simple text, it forces to enter
12. HTML5
23
only URL address either in http://www.example.com format or in
http://example.com format.
HTML5-datetime
A date and time (year, month, day, hour, minute, second, fractions of a second) encoded
according to ISO 8601 with the time zone set to UTC.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Date and Time : <input type = "datetime" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
13. HTML5
24
HTML5-datetimelocal
A date and time (year, month, day, hour, minute, second, fractions of a second) encoded
according to ISO 8601, with no time zone information.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Local Date and Time : <input type = "datetime-local" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
HTML5–date
A date (year, month, day) encoded according to ISO 8601.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
14. HTML5
25
Date : <input type = "date" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
HTML5–month
A date consisting of a year and a month encoded according to ISO 8601.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Month : <input type = "month" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
15. HTML5
26
Output
HTML5-week
A date consisting of a year and a week number encoded according to ISO 8601.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Week : <input type = "week" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
16. HTML5
27
HTML5–time
A time (hour, minute, seconds, fractional seconds) encoded according to ISO 8601.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Time : <input type = "time" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
HTML5–number
It accepts only numerical value. The step attribute specifies the precision, defaulting to 1.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
17. HTML5
28
Select Number : <input type = "number" min = "0" max = "10" step "1"
value = "5" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
HTML5–range
The range type is used for input fields that should contain a value from a range of numbers.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Select Range : <input type = "range" min = "0" max = "10" step "1"
value = "5" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
18. HTML5
29
Output
HTML5-email
It accepts only email value. This type is used for input fields that should contain an e-mail
address. If you try to submit a simple text, it forces to enter only email address in
[email protected] format.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Enter email : <input type = "email" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
19. HTML5
30
HTML5–URL
It accepts only URL value. This type is used for input fields that should contain a URL
address. If you try to submit a simple text, it forces to enter only URL address either
in http://www.example.com format or in http://example.com format.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Enter URL : <input type = "url" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
The<output>element
HTML5 introduced a new element <output> which is used to represent the result of
different types of output, such as output written by a script.
You can use the for attribute to specify a relationship between the output element and
other elements in the document that affected the calculation (for example, as inputs or
parameters). The value of the for attribute is a space-separated list of IDs of other
elements.
<!DOCTYPE HTML>
20. HTML5
31
<html>
<script type="text/javascript">
function showResult()
{
x = document.forms["myform"]["newinput"].value;
document.forms["myform"]["result"].value=x;
}
</script>
<body>
<form action="/cgi-bin/html5.cgi" method="get" name="myform">
Enter a value : <input type="text" name="newinput" />
<input type="button" value="Result" onclick="showResult();" />
<output name="result"/>
</form>
</body>
</html>
It will produce the following result −
Theplaceholderattribute
HTML5 introduced a new attribute called placeholder. This attribute on <input> and
<textarea> elements provide a hint to the user of what can be entered in the field. The
placeholder text must not contain carriage returns or line-feeds.
21. HTML5
32
Here is the simple syntax for placeholder attribute −
<input type="text" name="search" placeholder="search the web"/>
This attribute is supported by latest versions of Mozilla, Safari and Crome browsers only.
<!DOCTYPE HTML>
<html>
<body>
<form action="/cgi-bin/html5.cgi" method="get">
Enter email : <input type="email" name="newinput"
placeholder="[email protected]"/>
<input type="submit" value="submit" />
</form>
</body>
</html>
This will produce the following result −
Theautofocusattribute
This is a simple one-step pattern, easily programmed in JavaScript at the time of document
load, automatically focus one particular form field.
HTML5 introduced a new attribute called autofocus which would be used as follows −
<input type="text" name="search" autofocus/>
This attribute is supported by latest versions of Mozilla, Safari and Chrome browsers only.
22. HTML5
33
<!DOCTYPE HTML>
<html>
<body>
<form action="/cgi-bin/html5.cgi" method="get">
Enter email : <input type="text" name="newinput" autofocus/>
<p>Try to submit using Submit button</p>
<input type="submit" value="submit" />
</form>
</body>
</html>
Therequiredattribute
Now you do not need to have JavaScript for client-side validations like empty text box
would never be submitted because HTML5 introduced a new attribute
called required which would be used as follows and would insist to have a value −
<input type="text" name="search" required/>
This attribute is supported by latest versions of Mozilla, Safari and Chrome browsers only.
<!DOCTYPE HTML>
<html>
<body>
<form action="/cgi-bin/html5.cgi" method="get">
Enter email : <input type="text" name="newinput" required/>
<p>Try to submit using Submit button</p>
<input type="submit" value="submit" />
</form>
</body>
</html>
It will produce the following result –
24. HTML5
35
SVG stands for Scalable Vector Graphics and it is a language for describing 2D-graphics
and graphical applications in XML and the XML is then rendered by an SVG viewer.
SVG is mostly useful for vector type diagrams like Pie charts, Two-dimensional graphs in
an X,Y coordinate system etc.
SVG became a W3C Recommendation 14. January 2003 and you can check latest version
of SVG specification at SVG Specification.
ViewingSVGFiles
Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.
Internet Explorer users may have to install the Adobe SVG Viewer to be able to view
SVG in the browser.
EmbeddingSVGinHTML5
HTML5 allows embedding SVG directly using <svg>...</svg> tag which has following
simple syntax −
<svg xmlns="http://www.w3.org/2000/svg">
...
</svg>
Firefox 3.7 has also introduced a configuration option ("about:config") where you can
enable HTML5 using the following steps −
Type about:config in your Firefox address bar.
Click the "I'll be careful, I promise!" button on the warning message that appears
(and make sure you adhere to it!).
Type html5.enable into the filter bar at the top of the page.
Currently it would be disabled, so click it to toggle the value to true.
Now your Firefox HTML5 parser should be enabled and you should be able to experiment
with the following examples.
6. HTML5 − SVG
25. HTML5
36
HTML5−SVGCircle
Following is the HTML5 version of an SVG example which would draw a circle using
<circle> tag −
<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Circle</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<circle id="redcircle" cx="50" cy="50" r="50" fill="red" />
</svg>
</body>
</html>
This would produce the following result in HTML5 enabled latest version of Firefox.
HTML5−SVGRectangle
Following is the HTML5 version of an SVG example which would draw a rectangle using
<rect> tag −
<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
26. HTML5
37
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Rectangle</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<rect id="redrect" width="300" height="100" fill="red" />
</svg>
</body>
</html>
This would produce the following result in HTML5 enabled latest version of Firefox.
HTML5−SVGLine
Following is the HTML5 version of an SVG example which would draw a line using <line>
tag −
<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Line</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<line x1="0" y1="0" x2="200" y2="100" style="stroke:red;stroke-width:2"/>
27. HTML5
38
</svg>
</body>
</html>
You can use the style attribute which allows you to set additional style information like
stroke and fill colors, width of the stroke, etc.
This would produce the following result in HTML5 enabled latest version of Firefox.
HTML5−SVGEllipse
Following is the HTML5 version of an SVG example which would draw an ellipse using
<ellipse> tag –
<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Ellipse</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<ellipse cx="100" cy="50" rx="100" ry="50" fill="red" />
</svg>
</body>
</html>
28. HTML5
39
This would produce the following result in HTML5 enabled latest version of Firefox.
HTML5−SVGPolygon
Following is the HTML5 version of an SVG example which would draw a polygon using
<polygon> tag –
<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Polygon</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<polygon points="20,10 300,20, 170,50" fill="red" />
</svg>
</body>
</html>
This would produce the following result in HTML5 enabled latest version of Firefox.
29. HTML5
40
HTML5−SVGPolyline
Following is the HTML5 version of an SVG example which would draw a polyline using
<polyline> tag −
<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Polyline</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<polyline points="0,0 0,20 20,20 20,40 40,40 40,60" fill="red" />
</svg>
</body>
</html>
This would produce the following result in HTML5 enabled latest version of Firefox.
HTML5−SVGGradients
Following is the HTML5 version of an SVG example which would draw an ellipse using
<ellipse> tag and would use <radialGradient> tag to define an SVG radial gradient.
Similarly, you can use <linearGradient> tag to create SVG linear gradient.
30. HTML5
41
<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Gradient Ellipse</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="gradient" cx="50%" cy="50%" r="50%" fx="50%"
fy="50%">
<stop offset="0%" style="stop-color:rgb(200,200,200); stop-
opacity:0"/>
<stop offset="100%" style="stop-color:rgb(0,0,255); stop-
opacity:1"/>
</radialGradient>
</defs>
<ellipse cx="100" cy="50" rx="100" ry="50" style="fill:url(#gradient)" />
</svg>
</body>
</html>
This would produce the following result in HTML5 enabled latest version of Firefox.
31. HTML5
42
HTML5−SVGStar
Following is the HTML5 version of an SVG example which would draw a star using
<polygon> tag.
<html>
<head>
<style>
#svgelem{
position: relative;
left: 50%;
-webkit-transform: translateX(-40%);
-ms-transform: translateX(-40%);
transform: translateX(-40%);
}
</style>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2 align="center">HTML5 SVG Star</h2>
<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
<polygon points="100,10 40,180 190,60 10,60 160,180" fill="red"/>
</svg>
</body>
</html>
This would produce the following result in HTML5 enabled latest version of Firefox.
HTML5 SVG Star
32. HTML5
118
HTML5 features include native audio and video support without the need for Flash.
The HTML5 <audio> and <video> tags make it simple to add media to a website. You
need to set src attribute to identify the media source and include a controls attribute so
the user can play and pause the media.
EmbeddingVideo
Here is the simplest form of embedding a video file in your webpage:
<video src="foo.mp4" width="300" height="200" controls>
Your browser does not support the <video> element.
</video>
The current HTML5 draft specification does not specify which video formats browsers
should support in the video tag. But most commonly used video formats are:
Ogg: Ogg files with Thedora video codec and Vorbis audio codec.
mpeg4: MPEG4 files with H.264 video codec and AAC audio codec.
You can use <source> tag to specify media along with media type and many other
attributes. A video element allows multiple source elements and browser will use the first
recognized format:
<!DOCTYPE HTML>
<html>
<body>
<video width="300" height="200" controls autoplay>
<source src="/html5/foo.ogg" type="video/ogg" />
<source src="/html5/foo.mp4" type="video/mp4" />
Your browser does not support the <video> element.
</video>
</body>
</html>
13. HTML5 − Audio & Video
33. HTML5
119
This will produce the following result –
VideoAttributeSpecification
The HTML5 video tag can have a number of attributes to control the look and feel and
various functionalities of the control:
Attribute Description
autoplay
This Boolean attribute if specified, the video will automatically begin to
play back as soon as it can do so without stopping to finish loading the
data.
autobuffer
This Boolean attribute if specified, the video will automatically begin
buffering even if it's not set to automatically play.
controls
If this attribute is present, it will allow the user to control video playback,
including volume, seeking, and pause/resume playback.
height
This attribute specifies the height of the video's display area, in CSS
pixels.
loop
This Boolean attribute if specified, will allow video automatically seek back
to the start after reaching at the end.
preload
This attribute specifies that the video will be loaded at page load, and
ready to run. Ignored if autoplay is present.
poster This is a URL of an image to show until the user plays or seeks.
src
The URL of the video to embed. This is optional; you may instead use the
<source> element within the video block to specify the video to embed
width This attribute specifies the width of the video's display area, in CSS pixels.
34. HTML5
120
EmbeddingAudio
HTML5 supports <audio> tag which is used to embed sound content in an HTML or XHTML
document as follows.
<audio src="foo.wav" controls autoplay>
Your browser does not support the <audio> element.
</audio>
The current HTML5 draft specification does not specify which audio formats browsers
should support in the audio tag. But most commonly used audio formats are ogg,
mp3 and wav.
You can use <source> tag to specify media along with media type and many other
attributes. An audio element allows multiple source elements and browser will use the first
recognized format:
<!DOCTYPE HTML>
<html>
<body>
<audio controls autoplay>
<source src="/html5/audio.ogg" type="audio/ogg" />
<source src="/html5/audio.wav" type="audio/wav" />
Your browser does not support the <audio> element.
</audio>
</body>
</html>
This will produce the following result –
35. HTML5
121
AudioAttributeSpecification
The HTML5 audio tag can have a number of attributes to control the look and feel and
various functionalities of the control:
Attribute Description
autoplay
This Boolean attribute if specified, the audio will automatically begin to
play back as soon as it can do so without stopping to finish loading the
data.
autobuffer
This Boolean attribute if specified, the audio will automatically begin
buffering even if it's not set to automatically play.
controls
If this attribute is present, it will allow the user to control audio playback,
including volume, seeking, and pause/resume playback.
loop
This Boolean attribute if specified, will allow audio automatically seek back
to the start after reaching at the end.
preload
This attribute specifies that the audio will be loaded at page load, and
ready to run. Ignored if autoplay is present.
src
The URL of the audio to embed. This is optional; you may instead use the
<source> element within the video block to specify the video to embed
HandlingMediaEvents
The HTML5 audio and video tag can have a number of attributes to control various
functionalities of the control using JavaScript:
Event Description
abort This event is generated when playback is aborted.
canplay
This event is generated when enough data is available that the media
can be played.
ended This event is generated when playback completes.
error This event is generated when an error occurs.
loadeddata
This event is generated when the first frame of the media has finished
loading.
loadstart This event is generated when loading of the media begins.
pause This event is generated when playback is paused.
play This event is generated when playback starts or resumes.
progress
This event is generated periodically to inform the progress of the
downloading the media.
ratechange This event is generated when the playback speed changes.
36. HTML5
122
seeked This event is generated when a seek operation completes.
seeking This event is generated when a seek operation begins.
suspend This event is generated when loading of the media is suspended.
volumechange This event is generated when the audio volume changes.
waiting
This event is generated when the requested operation (such as
playback) is delayed pending the completion of another operation
(such as a seek).
Following is the example which allows to play the given video:
<!DOCTYPE HTML>
<head>
<script type="text/javascript">
function PlayVideo(){
var v = document.getElementsByTagName("video")[0];
v.play();
}
</script>
</head>
<html>
<body>
<form>
<video width="300" height="200" src="/html5/foo.mp4">
Your browser does not support the <video> element.
</video>
<input type="button" onclick="PlayVideo();" value="Play"/>
</form>
</body>
</html>
37. HTML5
123
This will produce the following result –
ConfiguringServersforMediaType
Most servers don't by default serve Ogg or mp4 media with the correct MIME types, so
you'll likely need to add the appropriate configuration for this.
AddType audio/ogg .oga
AddType audio/wav .wav
AddType video/ogg .ogv .ogg
AddType video/mp4 .mp4