Home >Web Front-end >Front-end Q&A >Is html5 the fifth revision?

Is html5 the fifth revision?

青灯夜游
青灯夜游Original
2022-01-18 10:34:171436browse

html5 is the fifth revision. HTML5 is the fifth revision to the HTML standard. Its main goal is to semanticize the Internet so that it can be better read by humans and machines, and at the same time provide better support for the embedding of various media; the syntax of HTML5 is backward compatible.

Is html5 the fifth revision?

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

HTML5

HTML5 is the fifth revision to the HTML standard. Its main goal is to semanticize the Internet so that it is better readable by humans and machines, and at the same time provide better support for embedding of various media. HTML5 syntax is backwards compatible. H5, which is now commonly referred to in China, includes CSS3 and JavaScript (strictly speaking, it is not appropriate to call it this way, but it is already wrong to call it this way).

HTML5 is the latest revised version of HTML. The standard was completed by the World Wide Web Consortium (W3C) in October 2014.

HTML5 is designed to support multimedia on mobile devices.

Some interesting new features in HTML5:

  • The canvas element for painting.

  • Video and audio elements for media playback

  • Better support for local offline storage.

  • New special content elements, such as article, footer, header, nav, section.

  • New form controls, such as calendar, date, time, email, url, search.

Improvements in HTML5

  • New elements

  • New attributes

  • Fully supports CSS3

  • Video and Audio

  • ##2D/3D graphics

  • Local storage

  • Local SQL data

  • Web application

New elements and attributes

1. Semantic tags

Semantic tags make the content of the page structured and well-known

## Tag 23bfccf8e44978cba95106989e8290e9ab946e7546ab66a280dd9c9f9310ecd5 c37f8231a37e88427e62669260f0074d84122da5b51c58ef54d7045814144010< ;nav>44f9630a3d507ae7532760da37622b0f 2f8332c8dcfd5c7dec030a070bf652c34d7ab0de9a42de71c682b0860bad1410 23c3de37f2f9ebcb477c4a90aac6fffd7618f95bdc39e398f223d37049478af115221ee8cba27fc1d7a26c47a001eb9bb68cffaf0006380b7e39ea0c3d532826##beb511a96a5aab3e931614dde36c9a0474bab71bc346026b84f2313feafdfe04 Used to describe details of a document or a section of a documentThe tag contains the title of the details elementDefine dialog box, such as prompt box
Description
defines the document The header area
defines the tail area of ​​the document
Define the navigation of the document
Define the sections in the document (section, section)
Define independent content areas of the page
Define the sidebar content of the page
##631fb227578dfffda61e1fa4d04b7d25039f3e95db2a684c7b74365531eb6044
a38fd2622755924ad24c0fc5f0b4d412e949bf554aab987df819ed6441bc3609

2. Enhanced form

HTML5 has multiple new form input types. These new features provide better input control and validation.

Input type

Description

color

Mainly used to select colors

date

Select a date from a date picker

datetime

Select a date (UTC time)

datetime-local

Select a date and time (no time zone)

email

Input field containing the e-mail address

month

Select a month

number

Input of numerical value Field

range

Input field for numeric values ​​within a certain range

search

Used for search domain

tel

Define the input phone number field

time

Select a time

url

Input of URL address Field

week

Select the week and year

HTML5 also adds the following Form Element

Form Element Description

fc86e7b705049fc9d4fccc89a2e80ee3

The element specifies the option list of the input field

Use the list attribute of the d5fd7aea971a85678ba271703566ebfd element to bind the id of the fc86e7b705049fc9d4fccc89a2e80ee3 element

aa983b9eb8086376f1f6481364a02e5a

Provides a reliable way to authenticate the user

The tag specifies the key pair generator field to be used in the form.

be6d67dae90cc1ad6469079e163d0939

For different types of output

such as calculations or scripts Output

HTML5 new form attribute

  • placehoder attribute, a short prompt will be displayed on the input field before the user enters the value. That is, our common default prompt of the input box disappears after the user inputs.

  • required attribute is a boolean attribute. The input field required to be filled in cannot be empty

  • pattern attribute describes a regular expression used to verify the value of the d5fd7aea971a85678ba271703566ebfd element.

  • min and max attributes, set the minimum and maximum value of the element.

  • step attribute specifies the legal number interval for the input field.

  • height and width attributes, used for the image height and width of the d5fd7aea971a85678ba271703566ebfd tag of type image.

  • The autofocus attribute is a boolean attribute. Specifies that the field automatically gains focus when the page loads.

  • multiple attribute is a boolean attribute. Specifies that multiple values ​​can be selected within the d5fd7aea971a85678ba271703566ebfd element.

HTML5 Multimedia

Using HTML5, you can simply play video and audio on web pages. ).

  • ##HTML5 provides a standard for playing audio files, that is, using the control attribute of the b97864c2e0ef2353a16c4d64c7734e92 element

  • <audio controls>
      <source src="horse.ogg" type="audio/ogg">
      <source src="horse.mp3" type="audio/mpeg">
    您的浏览器不支持 audio 元素。
    </audio>
Add play, pause and volume controls.

Between b97864c2e0ef2353a16c4d64c7734e92 and 81d2bc32cafa2076a27f10cdd878d0ab you need to insert the prompt text of the b97864c2e0ef2353a16c4d64c7734e92 element that the browser does not support.

The b97864c2e0ef2353a16c4d64c7734e92 element allows the use of multiple e02da388656c3265154666b7c71a8ddc elements. The e02da388656c3265154666b7c71a8ddc element can link different audio files, and the browser will use the first supported audio file

Currently, the b97864c2e0ef2353a16c4d64c7734e92 element supports three audio format files: MP3, Wav, and Ogg

  • HTML5 specifies a standard way to include video through the video element.

  • <video width="320" height="240" controls>
      <source src="movie.mp4" type="video/mp4">
      <source src="movie.ogg" type="video/ogg">
    您的浏览器不支持Video标签。
    </video>
control provides play, pause and volume controls to control the video. You can also use DOM operations to control the playback and pause of the video, such as the play() and pause() methods.

At the same time, the video element also provides width and height attributes to control the size of the video. If the height and width are set, the required video space will be reserved when the page is loaded. If these properties are not set and the browser does not know the size of the video, the browser will not be able to reserve a specific space when loading, and the page will change based on the size of the original video. The content inserted between the

and tags is provided for display by browsers that do not support the video element.

The video element supports multiple source elements. Elements can link different video files. The browser will use the first recognized format (MP4, WebM, and Ogg)

Related recommendations:《

html video tutorial

The above is the detailed content of Is html5 the fifth revision?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn