HTML 5 Flashcards
When writing HTML5 documents, one of the first new features that you’ll notice is the doc type declaration:

The character encoding (charset) declaration is also simplified:

Forms
- The Web Forms 2.0 specification allows for creation of more powerful forms and more compelling user experiences.
- Date pickers, color pickers, and numeric stepper controls have been added.
- Input field types now include email, search, and URL.
- PUT and DELETE form methods are now supported.
Integrated API (Application Programming Interfaces)
- Drag and Drop
- Audio and Video
- Offline Web Applications
- History
- Local Storage
- Geolocation
- Web Messaging
In HTML, elements typically belonged in either the block level or inline content model. HTML5 introduces seven main content models.
- Metadata
- Embedded
- Interactive
- Heading
- Phrasing
- Flow
- Sectioning
Metadata:
Content that sets up the presentation or behavior of the rest of the content. These elements are found in the head of the document.

Embedded:
Content that imports other resources into the document.

Interactive:
Content specifically intended for user interaction.

Heading:
Defines a section header.

Phrasing:
This model has a number of inline level elements in common with HTML4.

Flow content:
Contains the majority of HTML5 elements that would be included in the normal flow of the document.
Sectioning content:
Defines the scope of headings, content, navigation, and footers.
A generic HTML5 page structure looks like this:

In HTML4, we would define a header like this:





The footer element is also widely used. Generally we refer to a section located at the very bottom of the web page as the footer.

The following information is usually provided between these tags:
- Contact Information
- Privacy Policy
- Social Media Icons
- Terms of Service
- Copyright Information
- Sitemap and Related Documents
This tag represents a section of a page that links to other pages or to certain sections within the page. This would be a section with navigation links.

Here is an example of a major block of navigation links:





A self-contained, independent piece of content that can be used and distributed separately from the rest of the page or site.

This could also be a forum post, a magazine or newspaper article, a blog entry, a comment, an interactive widget or gadget, or any other independent piece of content.



is a logical container of the page or article.

can be used to divide up content within an article.
For example, a homepage could have a section for introducing the company, another for news items, and still another for contact information.
Sections


specifies a standard for embedding audio in a web page.

There are two different ways to specify the audio source file’s URL. The first uses the source attribute:



An element that creates an audio player inside the browser



When this attribute is defined, audio starts playing as soon as it is ready, without asking for the visitor’s permission.
autoplay
This attribute is used to have the audio replay every time it is finished.
loop
Specifies that audio controls should be displayed (such as a play/pause button, etc.)
controls
You can specify the video source URL using an attribute in a ________
video element
Another aspect shared by both the audio and the video elements is that each has _________ and __________ attributes
controls, autoplay and loop attributes.
An element provides the ability to create progress bars on the web. It can be used within headings, paragraphs, or anywhere else in the body.

Progress Element Attributes:
Specifies how much of the task has been completed.
Value
Progress Element Attributes:
Specifies how much work the task requires in total.
Max


There are two types of web storage objects
- sessionStorage()
- localStorage()
Local vs. Session:
is destroyed once the user closes the browser
Session Storage
Local vs. Session
stores data with no expiration date
Local Storage
_____________ for web storage for both local and session storage is very simple and similar.
The data is stored as key/value pairs.
The syntax
Storing a Value:

Getting a Value:

Removing a Value:

Removing All Values:

What is the Geolocation API?
In HTML5, the Geolocation API is used to obtain the user’s geographical location.
Since this can compromise user privacy, the option is not available unless the user approves it.
The Geolocation API’s main method is _______________, which retrieves the current geographic location of the user’s device.
getCurrentPosition
Defines the callback method that retrieves location information.
showLocation (mandatory)
Defines the callback method that is invoked when an error occurs in processing the asynchronous call.
ErrorHandler(optional)
Defines a set of options for retrieving the location information.
Options (optional)
User location can be presented in two ways
Geodetic and Civic.
This is a method or a way that describes the position. It refers directly to latitude and longitude
The geodetic way
_____________ of location data is presented in a format that is more easily read and understood by the average person.
The civic representation
A feature that lets you “grab” an object and drag it to a different location.
The drag and drop feature
To make an element draggable, just set the draggable attribute to true:

Is used to draw shapes with HTML-style markup
SVG stands for Scalable Vector Graphics
It offers several methods for drawing paths, boxes, circles, text, and graphic images.
SVG stands for Scalable Vector Graphics
An SVG image can be added to HTML code with just a basic image tag that includes a source attribute pointing to the image:
