An HTML iframe is used to display a web page within a web page.
The easiest way to play videos in HTML, is to use YouTube.
Struggling with Video Formats?
Earlier in this tutorial, you have seen that you might have to convert your videos to different formats to make them play in all browsers.
Converting videos to different formats can be difficult and time-consuming.
An easier solution is to let YouTube play the videos in your web page.
YouTube Video Id
YouTube will display an id (like tgbN6m87vqY), when you save (or play) a video.
You can use this id, and refer to your video in the HTML code.
Playing a YouTube Video in HTML
To play your video on a web page, do the following:
Upload the video to YouTube
Take a note of the video id
Define an iframe element in your web page
Let the src attribute point to the video URL
Use the width and height attributes to specify the dimension of the player
What is HTML Web Storage?
With web storage, web applications can store data locally within the user browser.
Before HTML5, application data had to be stored in cookies, included in every server request. Web storage is more secure, and large amounts of data can be stored locally, without affecting website performance.
Unlike cookies, the storage limit is far larger (at least 5MB) and information is never transferred to the server.
Web storage is per origin (per domain and protocol). All pages, from one origin, can store and access the same data.
Swap text for background images with the image replacement class. 0680424502
Use these shorthand utilities for quickly configuring how content overflows an element.
Stretched link Make any HTML element or Bootstrap component clickable by “stretching” a nested link via CSS.
When executing scripts in an HTML page, the page becomes unresponsive until the script is finished.
Input group Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs.
Buttons Use Bootstrap’s custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.
The id Attribute The HTML id attribute is used to specify a unique id for an HTML element (the value must be unique within the HTML document).
Using The id Attribute
In CSS, to select an element with a specific id, write a hash (#) character, followed by the id of the element:
State and Lifecycle This page introduces the concept of state and lifecycle in a React component. You can find a detailed component API reference here.
Consider the ticking clock example from one of the previous sections. In Rendering Elements, we have only learned one way to update the UI. We call ReactDOM.render() to change the rendered output: