etc
Video and Audio
Your browser does not support the video tag.
Form Enhancements
New Input types: color, email, date, month, week, time, datetime, datetime-local, number, range, search, tel, and url
New attributes:require d, autofocus , pattern, list, autocomplete and placeholder
New elements:,,,and
canvas tag drawing 2D graphics.
var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); context.beginPath(); context.moveTo(100,100); context.lineTo(300,300); context.lineTo(100,500); context.lineWidth = 5; context.strokeStyle = "red"; context.stroke();
Geolocation acquisition
HTML semantics
1. What is HTML semantics?
Determine the semantics of the content through tags. For example, determine the content is a title based on the h1 tag, determine the content is a paragraph based on the
, and determine the tag is an input box, etc.
2. Why semantics?
1). When the style is removed or lost, the page can present a clear structure 2). Convenient for other devices to parse (such as screen readers, blind readers, mobile devices) to make sense Way to render web pages 3). Conducive to SEO 4). Facilitate team development and maintenance, follow W3C standards, can reduce differentiation
3. How to determine your tags Is it semantically sound?
Remove the style and see if the web page structure is well organized and orderly, and whether it is still very readable.
4. Common semantic tag modules
Form
The form fields should be wrapped with fieldset tags, and the legend tag should be used to describe the purpose of the form. ;The description text corresponding to eachinput label needs to use the label tag, and by setting the id attribute for the input and setting for=someld in the label tag, the description text is associated with the corresponding input.
5. Some issues that should be paid attention to in semantic tags
Use unsemantic tags p and span as little as possible; When the semantics are not obvious, When you can use p or p, try to use p, because p has upper and lower spacing by default, which is beneficial to compatibility with special terminals; Do not use pure style tags, such as: b, font, u, etc., use css settings instead . Text that needs to be emphasized can be included in the strong or em tag. The default style of strong is bold (do not use b), and em is italic (do not use i)
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
html5 How to achieve the animation effect of pictures turning in circles
How to automatically play background music in H5 videos
The above is the detailed content of H5 semantic tags. For more information, please follow other related articles on the PHP Chinese website!