On the 10 most frequently made HTML tag errors in Web standards

Source: Internet
Author: User
Tags define html tags new set
Please read and write down the following 10 articles. This list contains 10 of the most frequently made HTML tag errors, which make it possible for us to avoid making this common mistake by making our HTML tags conform to semantics, and standard requirements

Crime 1: Put the block-level elements inside the inline element

HTML elements behave in just two ways: block-level and inline. Each label has a default representation that is not block-level or inline. Like Div and P are block-level elements that are used to form a document structure. Inline elements can only be within a fast-level element.

Crime 2:img label does not contain ALT attribute

The Alt property is all the attributes that must be displayed in a picture in a Web page. It helps people to know what the picture is. Or what the meaning of the picture is when the internet is slow. Its main purpose is to illustrate the meaning of the picture, and think that the description alt= "image" is very bad. If, Some of the pictures are really just decorative effect, then suggest you write alt= "".

Crime 3: Not using list when necessary

Crime 4: Use and to display bold characters and italic

You can define Font-weight and Font-style with CSS styles. If you have to write a label on the page, replace the . with a or tag without any semantics, but for a more concise page, choose a CSS definition style.

Crime 5: Use too much

Line-wrapping tags should only be used for inserts that are in the first text stream line break to knock a new line into a special word. It should not be used to create gaps between elements, but rather split into different paragraphs, or adjust the amplitude of the CSS style text.

Crime 6: Using the wrong strikethrough label

In the old days, and allowed to define site text. However, now they are defined as deprecated tags when they can still be effective. Now with the new set of tags- and . To replace

Crime 7: Using inline styles

The most important purpose of CSS is to differentiate between documents and styles, and if you write style to the page, there is no CSS at all. So remember to put your style where it's supposed to be.

Crime 8: Add border to HTML

Offence 9: Header label not used


Crime 10: No semantic or

Not to be W3 recommended, and (flashing, scrolling) tags are sheer ugliness. Do not use this tag, if you must use this effect, I believe that you will have other better results.

Related Article

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.