visit
This is a note originally from the article of , and , and picked up the parts that is inspiring to me.I am recently involving time and effort in mastering front-end skill, and I would say front-end is evoluting so fast , new framework and standard come up every few months. Sound like it is so hard to catch and to become a front-end master, but it is not true, likelihood the animal kingdom, it is diverse, there is so much to study about different species, or different behavior of individual of one species. But there is couple of perpetual core in animal, like cell. And I can say that HTML, CSS, Javascript and HTTP request are the cell of website. Many longevity website, 10, 20 years old, are supporting both outdated browser for the loyalty users and the browser on newest mobile for hipster users, support cross browser and old browser are always the two big problem in web development, there is not a silver bullet. Understanding HTML5 is understanding the cell of website, which makes an organic web to speak, to move, to interact with human.
Types
for Scripts and Links
<!DOCTYPE
HTML5 comes up with the new <figure> and <figcaption> element, effectively isolates its content from its ancestor’s structure. Whatever’s inside the figure doesn’t contribute to the document outline outside it.
<figure>
<img
<figcaption>
<p>This is an image of something interesting. </p>
</figcaption>
</figure>
Types
for Scripts and LinksYou possibly still add the type
attribute to your link
and script
tags.
<link
<script
It is connoted that both of these tags are concerned with stylesheets and scripts.
<link
<script
<p class=myClass id=someId> Start the reactor. </p>
The HTML5 <audio> element specifies a standard way to embed audio in a web page.In HTML5, there are 3 supported audio formats: MP3, Wav, and Ogg.
Much like the <audio>
element, before HTML5, a video could only be played in a browser with a plug-in (like flash).
The HTML5 <video> element specifies a standard way to embed a video in a web page. However, Safari and IE9 will accept HTML5 video in the H.264 format while Firefox and Opera accept the Theora and Vorbis formats. And, the Chrome will show off videos that are encoded in both the mp4 and Ogg formats.
Before HTML5, application data had to be stored in cookies, included in every server request. Local 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.
Local storage is per origin (per domain and protocol). All pages, from one origin, can store and access the same data.
If we apply a type
of "email" to form inputs, we can instruct the browser to only allow strings that conform to a valid email address structure.
Earlier, developers have to use a JavaScript to build placeholders for textboxes. But now you don’t need to utilize JS for this because HTML5 introduces the Placeholder attribute that will display the text in a field until the field is focused.
<input name="email" type="email" placeholder="" />The required attribute is a Boolean attribute that determines whether input field is filled out or not before the final submission of the form.
<input type="text" name="someInput" required> or <input type="text" name="someInput" required="required">
<form action="/action_page.php">First name: <input type="text" name="fname" autofocus><br>Last name: <input type="text" name="lname"><br><input type="submit"></form>
()