HTML5 DOCUMENTATION PDF
HTML5 is the latest evolution of the standard that defines HTML. The term represents two different concepts. It is a new version of the language. HTML5 is the latest and most enhanced version of HTML. This tutorial has been designed for beginners in HTML5 to make them understand the basic-. Media, Inc. HTML5 Canvas, Second Edition, the image of a New Zealand .. ample code from this book into your product's documentation does.
|Language:||English, Spanish, German|
|ePub File Size:||18.41 MB|
|PDF File Size:||13.55 MB|
|Distribution:||Free* [*Regsitration Required]|
This document is an Editors Draft of the “HTML5 Reference” produced by the HTML the element must be either empty or contain only script documentation. Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly Media, Inc. HTML5 Pocket Reference, the image of. href: destination resource of the hyperlink hreflang: gives the language of the linked resource media: describes for which media the target docu- ment was.
The term represents two different concepts. It is a new version of the language HTML, with new elements, attributes, and behaviors, and a larger set of technologies that allows the building of more diverse and powerful Web sites and applications. Designed to be usable by all Open Web developers, this reference page links to numerous resources about HTML5 technologies, classified into several groups based on their function. Offline resources: The application cache. CSS has been extended to be able to style elements in a much more complex way. This is often referred as CSS3 , though CSS is not a monolithic specification any more and the different modules are not all at level 3:
The base element is for specifying a base URL against which relative links will be resolved, and the name of the default target for opening links and form submissions. The link is for linking to other resources, such as stylesheets, favicons and syndication feeds. The LinkStyle interface must also be implemented by this element, the styling processing model defines how. The meta element is for providing various types of metadata, such as the application-name or specifying the documents character encoding.
The noscript element is used to provide alternative content for users using browsers that do not support scripting or have it disabled. The body element represents the main content of the document. The section element represents a generic document or application section. A section, in this context, is a thematic grouping of content, typically with a header and possibly a footer. The nav element represents a section of a page containing primary navigation links to other pages or to parts within the page.
The article element represents an independent section of a document, page, or site. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, or any other independent item of content.
The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography. The header element represents the header of a section, typically containing headings and subheadings, and other metadata about the section.
The footer element represents a footer of a section, typically containing information such as who wrote it, links to related documents, and copyright notices.
The address element represents the contact information for the section it applies to. If it applies to the body element , then it instead applies to the document as a whole.
A typical document is often structured into different sections and subsections, with each potentially having its own heading and possibly a subheading. These heading and sectioning elements provide a way for this structure to be conveyed to the reader.
The p element represents a paragraph. The hr element represents a paragraph -level thematic break, e. The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements. The dialog element represents a conversation.
The blockquote element represents a section that is quoted from another source. The ol element represents an ordered list. The ul element represents an unordered list. The dl element introduces an association list containing groups of terms and associated descriptions. The dt element represents the term, or name, part of a term-description group in a description list dl element , and the talker, or speaker, part of a talker-discourse pair in a conversation dialog element.
The dd element represents the description, definition, or value, part of a term-description group in a description list dl element , and the discourse, or quote, part in a conversation dialog element. If the a element has an href attribute, then it represents a hyperlink. The Command interface must also be implemented by this element. The q element represents a phrase quoted from another source. The cite element represents the title of a work, such as an article, a book, a poem, a song, a film, or any other creative work.
The em element represents stress emphasis of its contents. The strong element represents strong importance for its contents. The small element represents small print part of a document often describing legal restrictions, such as copyrights or other disadvantages , or other side comments. The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.
The dfn element represents the defining instance of a term, where its definition is provided nearby.
The abbr element represents an abbreviation or acronym, optionally with its expansion. The progress element represents the completion progress of a task. The meter element represents a scalar measurement within a known range, or a fractional value. The code element represents a fragment of computer code. The var element represents a variable, such as in a mathematical expression or programming context, or it could just be a term used as a placeholder in prose.
The samp element represents sample output from a program or computing system. The kbd element represents user input typically keyboard input, although it may also be used to represent other input, such as voice commands. The sup element represents a superscript and the sub element represents a subscript.
The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.
The b element represents a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is boldened. The bdo element allows authors to override the Unicode bidi algorithm by explicitly specifying a direction override. The ruby element allows one or more spans of phrasing content to be marked with ruby annotations.
Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronounciation or to include other annotations. In Japanese, this form of typography is also known as furigana. The rt element marks the ruby text component of a ruby annotation.
The ins element represents an addition to the document. The del element represents a removal from the document. The iframe element introduces a new nested browsing context.
The embed element represents an integration point for an external typically non-HTML application or interactive content. Depending on the type of content instantiated by the embed element, the node may also support other interfaces. The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context , or as an external resource to be processed by a plugin.
Depending on the type of content instantiated by the object element, the node may also support other interfaces. The param element defines parameters for plugins invoked by object elements.
A video element represents a video or movie. An audio element represents a sound or audio stream. The source element allows authors to specify multiple media resources for media elements. The canvas element represents a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, or other visual images on the fly.
The map element, in conjunction with any area element descendants, defines an image map. The area element represents either a hyperlink with some text and a corresponding area on an image map , or a dead area on an image map. The table element represents data with more than one dimension a table. The caption element represents the title of the table that is its parent, if it has a parent and that is a table element. The colgroup element represents a group of one or more columns in the table that is its parent, if it has a parent and that is a table element.
If a col element has a parent and that is a colgroup element that itself has a parent that is a table element, then the col element represents one or more columns in the column group represented by that colgroup. This interface defines one member, span. The tbody element represents a block of rows that consist of a body of data for the parent table element, if the tbody element has a parent and it is a table.
The thead element represents the block of rows that consist of the column labels headers for the parent table element, if the thead element has a parent and it is a table. The tfoot element represents the block of rows that consist of the column summaries footers for the parent table element, if the tfoot element has a parent and it is a table.
The tr element represents a row of cells in a table. The td element represents a data cell in a table. The th element represents a header cell in a table. The form element represents a collection of form-associated elements , some of which can represent editable values that can be submitted to a server for processing. The fieldset element represents a set of form controls grouped under a common name. The label represents a caption in a user interface. The input element represents a typed data field, usually with a form control to allow the user to edit the data.
The button element represents a button. If the element is not disabled , then the user agent should allow the user to activate the button. The select element represents a control for selecting amongst a set of options.
The datalist element represents a set of option elements that represent predefined options for other controls. The contents of the element represents fallback content for legacy user agents, intermixed with option elements that represent the predefined options.
In the rendering, the datalist element represents nothing and it, along with its children, should be hidden. The optgroup element represents a group of option elements with a common label.
The option element represents an option in a select element or as part of a list of suggestions in a datalist element. The output element represents the result of a calculation. The details element represents additional information or controls which the user can obtain on demand. The command element represents a command that the user can invoke.
The bb element represents a user agent command that the user can invoke. The menu element represents a list of commands. The div element represents nothing at all. These elements are obsolete and should not be used by authors. However, they are documented here because they are supported by browsers, along with notes about conforming alternatives that may be used instead.
Notes are used throughout this document to provide additional information. Tips are used to provide useful hints and suggestions. Warnings are used to point out common authoring errors and highlight important issues to be aware of. In some cases, the markup is the same and thus only one example is needed, but in others there may be differences syntactic differences.
Sometimes, erroneous examples are included. This is usually done to illustrate common authoring errors, bad practices and other issues to be cautious of. Unless explicitly stated otherwise for a specific purpose, all attribute values in examples are quoted using double quotes. In HTML, however, the trailing slash is optional and, unless explicitly stated otherwise, is always omitted. In such cases, the following prefixes are assumed to be defined even if there is no xmlns attributes in the fragment of code.
Start tag: Contained By: As the root element of a document. Wherever a subdocument fragment is allowed in a compound document. Content Model: A head element followed by a body element. Attributes Global attributes manifest. HTML Example: As the first element in an html element. One or more elements of metadata content , of which exactly one is a title element. Attributes Global attributes. Metadata content. In a head element containing no other title elements.
In a head element containing no other base elements. Attributes Global attributes href target.
HTML5 - Developer guides | MDN
Where metadata content is expected. In a noscript element that is a child of a head element. Attributes Global attributes href rel media hreflang type sizes Also, the title attribute has special semantics on this element. If the charset attribute is present, or if the element is in the Encoding declaration state: If the http-equiv attribute is present, and the element is not in the Encoding declaration state: If the name attribute is present: Attributes Global attributes name http-equiv content charset.
If the scoped attribute is present: If the scoped attribute is absent: Depends on the value of the type attribute. Attributes Global attributes media type scoped Also, the title attribute has special semantics on this element. Flow content. Phrasing content. Where phrasing content is expected. If there is no src attribute, depends on the value of the type attribute. If there is a src attribute, the element must be either empty or contain only script documentation.
Attributes Global attributes src async defer type charset. In a head element of an HTML document , if there are no ancestor noscript elements. Where phrasing content is expected in HTML documents , if there are no ancestor noscript elements. When scripting is disabled , in a head element: When scripting is disabled , not in a head element: Sectioning root.
As the second element in an html element. Attributes Global attributes onbeforeunload onerror onhashchange onload onmessage onoffline ononline onpopstate onresize onstorage onunload. Sectioning content. Where flow content is expected. Heading content. Flow content , including at least one descendant that is heading content , but no sectioning content descendants, no header element descendants, and no footer element descendants.
Flow content , but with no heading content descendants, no sectioning content descendants, and no footer element descendants. Flow content , but with no heading content descendants, no sectioning content descendants, no footer element descendants, and no address element descendants. Zero or more pairs of one dt element followed by one dd element.
Attributes Global attributes cite. Zero or more li elements. Attributes Global attributes reversed start.
Inside ol elements. Inside ul elements. Inside menu elements. Attributes Global attributes If the element is a child of an ol element: Zero or more groups each consisting of one or more dt elements followed by one or more dd elements.
Before dd or dt elements inside dl elements. Before a dd element inside a dialog element.
After dt or dd elements inside dl elements. After a dt element inside a dialog element. Interactive content. When the element only contains phrasing content: Transparent , but there must be no interactive content descendant. Attributes Global attributes href target ping rel media hreflang type. Phrasing content , but there must be no descendant dfn elements. Attributes Global attributes Also, the title attribute has special semantics on this element.
Attributes Global attributes datetime. Attributes Global attributes value max. Attributes Global attributes value min low high max optimum.
Attributes Global attributes Also, the dir global attribute has special semantics on this element. One or more groups of: As a child of a ruby element. As a child of a ruby element, either immediately before or immediately after an rt element. If the rp element is immediately after an rt element that is immediately preceded by another rp element: Attributes Global attributes cite datetime. Flow content followed by one legend element. Embedded content. If the element has an usemap attribute: Where embedded content is expected.
Attributes Global attributes alt src usemap ismap width height. Text that conforms to the requirements given in the prose. Attributes Global attributes src name sandbox seamless width height. Attributes Global attributes src type width height Any other attribute that has no namespace see prose.
Listed , submittable , form-associated element. Zero or more param elements, then, transparent.
HTML5 Notes for Professionals book
Attributes Global attributes data type name usemap form width height. As a child of an object element, before any flow content. Attributes Global attributes name value. If the element has a controls attribute: If the element has a src attribute: If the element does not have a src attribute: Attributes Global attributes src poster autobuffer autoplay loop controls width height.
Attributes Global attributes src autobuffer autoplay loop controls. As a child of a media element , before any flow content. Attributes Global attributes src type media. Attributes Global attributes width height. Attributes Global attributes name. Where phrasing content is expected, but only if there is a map element ancestor. Attributes Global attributes alt coords shape href target ping rel media hreflang type. In this order: As the first element child of a table element.
As a child of a table element, after any caption elements and before any thead , tbody , tfoot , and tr elements. Zero or more col elements. Attributes Global attributes span. As a child of a colgroup element that doesn't have a span attribute. As a child of a table element, after any caption , colgroup , and thead elements, but only if there are no tr elements that are children of the table element.
Zero or more tr elements Attributes Global attributes. As a child of a table element, after any caption , and colgroup elements and before any tbody , tfoot , and tr elements, but only if there are no other thead elements that are children of the table element. As a child of a table element, after any caption , colgroup , and thead elements and before any tbody and tr elements, but only if there are no other tfoot elements that are children of the table element.
As a child of a table element, after any caption , colgroup , thead , tbody , and tr elements, but only if there are no other tfoot elements that are children of the table element. As a child of a thead element. As a child of a tbody element.
As a child of a tfoot element. As a child of a table element, after any caption , colgroup , and thead elements, but only if there are no tbody elements that are children of the table element. Zero or more td or th elements Attributes Global attributes. As a child of a tr element. Attributes Global attributes colspan rowspan headers. Attributes Global attributes colspan rowspan headers scope. Flow content , but with no form element descendants. Attributes Global attributes accept-charset action autocomplete enctype method name novalidate target.
Listed form-associated element. One legend element follwed by flow content. Attributes Global attributes disabled form name. Form-associated element.
HTML Cheat Sheet (New HTML5 Tags Included)
Phrasing content , but with no descendant labelable form-associated elements unless it is the element's labeled control , and no descendant label elements. Attributes Global attributes form for.
WHATWG client-side session and persistent storage aka DOM storage Client-side session and persistent storage allows web applications to store structured data on the client side. IndexedDB IndexedDB is a web standard for the storage of significant amounts of structured data in the browser and for high performance searches on this data using indexes.
This includes support for selecting multiple files using the element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.
There also is FileReader. It lets you specify timed text tracks or time-based data , for example to automatically handle subtitles. The tracks are formatted in WebVTT format. WebVTT is a text track format. XMLHttpRequest level 2 Allows fetching asynchronously some parts of the page, allowing it to display dynamic content, varying according to the time and user actions.
This is the technology behind Ajax. History API Allows the manipulation of the browser history. This is especially useful for pages loading interactively new information. The contentEditable Attribute: Transform your website to a wiki! HTML5 has standardized the contentEditable attribute. Learn more about this feature.
This also provides a simpler API for use by extensions and Mozilla-based applications. Web-based protocol handlers You can now register web applications as protocol handlers using the navigator. Pointer Lock API Allows locking the pointer to the content, so games and similar applications don't lose focus when the pointer reaches the window limit. Online and offline events In order to build a good offline-capable web application, you need to know when your application is actually offline.
Incidentally, you also need to know when your application has returned to an online status again. Touch events Handlers to react to events created by a user pressing touch screens.
Using geolocation Let browsers locate the position of the user using geolocation. Detecting device orientation Get the information when the device on which the browser runs changes orientation. This can be used as an input device e. Pointer Lock API Allows locking the pointer to the content, so games and similar application don't lose focus when the pointer reaches the window limit. StylIng CSS has been extended to be able to style elements in a much more complex way.
New background styling features It is now possible to put shadows on elements using box-shadow , multiple backgrounds , and CSS filter s. You can learn more about these by reading Advanced box effects. More fancy borders Not only it is now possible to use images to style borders, using border-image and its associated longhand properties, but rounded borders are supported via the border-radius property.
Animating your style Using CSS Transitions to animate between different states or using CSS Animations to animate parts of the page without a triggering event, you can now control mobile elements on your page.
Typography improvement Authors have better control to reach better typography. They can control text-overflow and hyphenation , but also can add a shadow to it or control more precisely its decorations. Custom typefaces can be downloaded and applied thanks to the new font-face at-rule.
New presentational layouts In order to improve the flexibility of designs, two new layouts have been added: