- sessionStorage()
- localStorage()
Local vs. Session
- Session Storage is destroyed once the user closes the browser
- Local Storage stores data with no expiration date
Note: You need to be familiar with basic JavaScript in order to understand and use the API
- More secure
- Faster
- Stores a larger amount of data
- Stored data is not sent with every server request
Note: Local storage is per domain. All pages from one domain can store and access the same data.
Value
Specifies how much of the task has been completed
Max
Specifies how much work the task requires in totalStatus: <progress min="0" max="100" value="35">
</progress>
<progress>
element provides the ability to create progress bars on the web. The progress element can be used within headings, paragraphs, or anywhere else in the bodyStatus: <progress min="0" max="100" value="35">
</progress>
Note: Use the <progress> tag in conjunction with JavaScript to dynamically display a task's progress
<video controls autoplay loop>
<source src="http://www.sololearn.com/uploads/video.mp4" type="video/mp4">
<source src="http://www.sololearn.com/uploads/video.ogg" type="video/ogg">
Video is not supported by your browser
</video>
In this example, the video will replay after it finishes playing
Note: Currently, there are three supported video formats for the <video> element: MP4, WebM, and OGG
<video controls>
<source src="http://www.sololearn.com/uploads/video.mp4" type="video/mp4">
<source src="http://www.sololearn.com/uploads/video.ogg" type="video/ogg">
Video is not supported by your browser
</video>
Note: Another aspect that the audio and video elements have in common is that the major browsers do not all support the same file types. If the browser does not support the first video type, it will try the next one.
controls
Specifies that audio controls should be displayed (such as a play/pause button, etc.)<audio controls>
<source src="http://www.sololearn.com/uploads/audio.mp3" type="audio/mpeg">
Audio element not supported by your browser.
</audio>
autoplay
When this attribute is defined, audio starts playing as soon as it is ready, without asking for the visitor's permission<audio controls autoplay>
<source src="http://www.sololearn.com/uploads/audio.mp3" type="audio/mpeg">
Audio element not supported by your browser.
</audio>
loop
This attribute is used to have the audio replay every time it is finished<audio controls autoplay loop>
<source src="http://www.sololearn.com/uploads/audio.mp3" type="audio/mpeg">
Audio element not supported by your browser.
</audio>
<audio src="http://www.sololearn.com/uploads/audio.mp3" controls>
Audio element not supported by your browser
</audio>
Another way of specifying audio URL<audio controls>
<source src="http://www.sololearn.com/uploads/audio.mp3" type="audio/mpeg">
<source src="http://www.sololearn.com/uploads/audio.ogg" type="audio/ogg">
</audio>
<aside>
is secondary or tangential content which could be considered separate from but indirectly related to the main content.
This type of content is often represented in sidebars.
When an <aside>
tag is used within an <article>
tag, the content of the <aside>
should be specifically related to that article<article>
<h1> Gifts for everyone</h1>
<p>This website will be the best place for choosing gifts</p>
<aside>
<p>Gifts will be delivered to you within 24 hours</p>
</aside>
</article>
<section>
is a logical container of the page or article.
Sections 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<article>
<h1>Welcome</h1>
<section>
<h1>Heading</h1>
<p>content or image</p>
</section>
</article>