HTML5 learning notes simplified version (10): obsolete elements and attributes

Source: Internet
Author: User

Discarded Element)

The elements listed in this section will not be used in html5. you can use some alternative solutions to upgrade existing documents to html5. For example, the parser section can process the isindex element.

The reason why the following elements are deprecated is that CSS processing can better replace them:

  1. Basefont
  2. Big
  3. Center
  4. Font
  5. Strike
  6. Tt

The following elements are deprecated because their use destroys usability and accessibility:

  1. Frame
  2. Frameset
  3. Noframes

The reason why the following elements are deprecated is that they are not often used, which can also cause confusion. Other elements can also implement their functions well:

  • Acronym is discarded because it often causes page disorder and can be replaced by abbr.
  • The applet is discarded because it can be replaced by an object.
  • Isindex is discarded because it is replaced by a Form Control.
  • Dir is discarded because ul is used instead.

Finally, the noscript element can only be used in HTML, but not in XML.

 

Discarded Attribute)

Some attributes in HTML4 are no longer allowed to be used in html5. the specification details how to deal with existing documents, and these attributes cannot be used in new documents in the future, because they are marked as invalid attributes.

HTML5 specifications have alternative solutions for these attributes. Click to access them.

ID

Corresponding Element

Attribute name

01

Link,

Rev, charset

02

A

Shape, coords

03

Img, iframe

Longdesc

04

Link

Target

05

Area

Nohref

06

Head

Profile

07

Html

Version

08

Img

Name

09

Meta

Scheme

10

Object

Archive, classid, codebase, codetype, declare, standby

11

Param

Valuetype, type

12

Td, th

Axis, abbr

13

Td

Scope

14

Table

Summary

 

In addition, in HTML5, the visual attributes of the following elements will also be discarded, because these functions can be implemented using CSS:

 

ID

Corresponding Element

Attribute name

01

Caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead, tr

Align

02

Body

Alink, link, text, vlink

03

Body

Background

04

Table, tr, td, th, body

Bgcolor

05

Object

Border

06

Table

Cellpadding, cellspacing

07

Col, colgroup, tbody, td, tfoot, th, thead, tr

Char, charoff

08

Br

Clear

09

Dl, menu, ol, ul

Compact

10

Table

Frame

11

Iframe

Frameborder

12

Td, th

Height

13

Img, object

Hspace, vspace

14

Iframe

Marginheight, marginwidth

15

Hr

Noshade

16

Td, th

Nowrap

17

Table

Rules

18

Iframe

Scrolling

19

Hr

Size

20

Li, ol, ul

Type

21

Col, colgroup, tbody, td, tfoot, th, thead, tr

Valign

22

Hr, table, td, th, col, colgroup, pre

Width

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.