Home  >  Article  >  Web Front-end  >  HTML5 first look at 2 new elements

HTML5 first look at 2 new elements

黄舟
黄舟Original
2017-05-21 14:21:401520browse

1. Block element

##HTML5 defines 8 new HTML semantic (semantic) elements, these elements are block-level elements. In order to allow older versions of browsers to display these elements correctly, you can set the CSS##display property to block

header, section, footer, aside, nav, main, article,figure{
 display: block;
}


##2.

Add new element

Add a new element to

HTML, and define the style and element name for the element For 523a75af872c9b7da9495f252f14cbcb##:

<!DOCTYPE html>
  <html>
  
  <head>
    <title>Creating an HTML Element</title>
     <script>document.createElement("myHero")</script>
    <style>
    myHero {
      display: block;
      background-color: #ddd;
      padding: 50px;
      font-size: 30px;
    } 
    </style> 
  </head>
  
  <body>
  
  <h1>我的第一个标题</h1>
  
  <p>我的第一个段落。</p>
  
  <myHero>我的第一个新元素</myHero>
  
  </body>
  </html>
3.

MultimediaElement

##labelb97864c2e0ef2353a16c4d64c7734e9239000f942b2545a5315c57fa3276f220e02da388656c3265154666b7c71a8ddc and
sign

Description

##DefinitionAudio

Content

DefinitionVideo

(
video

or movie)

##Define multimedia resources 39000f942b2545a5315c57fa3276f220

b97864c2e0ef2353a16c4d64c7734e92#d8e2720730be5ddc9c2a3782839e8eb6

Define embedded content, such as plug-ins.

#9bf7cbf2c39baa37076a22499de2f6ed

##Specify external text tracks for media such as

39000f942b2545a5315c57fa3276f220 and

b97864c2e0ef2353a16c4d64c7734e92
elements.

##4. Canvas ElementElement

##ea79ed816fc39437ed76490f1991cc74

## Label definition graphic , such as charts and other images. This tag is based on
Drawing

JavaScript

API


5.
New form element

#labelsign

Description

8ea4c07ce459fbda8851893664118a5a

Define the option list. Please use this element in conjunction with the input element to define the input possible values.

#3527c3935c921bc2a712518c96801519

Specifies the key pair to be used for the form

Generator field.

#be6d67dae90cc1ad6469079e163d0939

##Define different types of output, such as script output.


6.
New semantic and structural elements

Define page content content outside. #af4e6c3c591431c4583becd75d1c3582#e2b9f03cad787b9644e1f51fd23b7dac, such as ##a5e9d42b316b6d06c62de0deffc36939# The ## tag contains the Specify independent stream content (images, charts, photos, code, etc.). Definition 24203f2f45e6606542ba09fd2181843a section ##Define weights and measures. Use only for measurements with known maximum and minimum values. #c787b9a589a3ece771e842a6176cf8e9#6ecb87e5318a36c03c59e25d55f43372 (Chinese phonetic pronunciation or characters). #7240f116d85a7ee375466871bc33670a ## Used in ruby ​​#2f8332c8dcfd5c7dec030a070bf652c3

## LabelTag

Description

23c3de37f2f9ebcb477c4a90aac6fffd

##Define the sidebar content of the page

##15221ee8cba27fc1d7a26c47a001eb9b

Allows you to set a piece of text independent of the text direction setting of its parent element.

Define command

Button
radio button

, checkbox or button

##Details used to describe a document or a certain part of a document

##a38fd2622755924ad24c0fc5f0b4d412

##Definition Dialog box, such as prompt box

##631fb227578dfffda61e1fa4d04b7d25

details title of the element

#24203f2f45e6606542ba09fd2181843a

#614eb9dc63b3fb809437a716aa228d24

The title of the element

##< ;footer>

define
or

document footer.

#1aa9e5d373740b65a0cc8f0a02150c53 ##Defines the header area of ​​the document

##f920514e6447cf1d171079d1371f007f

Define text with tokens.

#49c6123c49c6be380cb91db06cd3bfa9

##Define the running progress (process).

##Define the progress of any type of task.

#ec41f2147470148e85ad0337a362103e

##Definition ruby ​​

Comment

## Define the interpretation or pronunciation of characters (Chinese phonetic symbols or characters).

#515718f19dfe6612658be14be18aa0ec

comments to define the content displayed by browsers that do not support the ruby element.

定义文档中的节(section、区段)。

865ebc4a8f40017839ddd62af936776f

定义日期或时间。

37fcc81822f151c26d66e5caf9953670

规定在文本中的何处适合添加换行符。

 

 

7.   已移除的元素

HTML5中不再使用,已经被删除

·    <acronym>
·    <applet>
·    <basefont>
·    <big>
·    <center>
·    <dir>
·    <font>
·    <frame>
·    <frameset>
·    <noframes>
·    <strike>
·    <tt>


The above is the detailed content of HTML5 first look at 2 new elements. 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
Previous article:A first look at HTML5Next article:A first look at HTML5