CSS replacement elements and non-replacement elements in-line non-replacement elements

Source: Internet
Author: User

HTML elements can also be divided into replacement elements and non-replacement elements

1. Replacing elements

The replacement element is the content that is displayed by the browser based on the elements and attributes represented.

For example: He is determined by the tag element img and the attribute src to determine what is displayed.

<input type= "text"/> If text is replaced with another property value, input will show a different look, which is also the input and type attribute values that determine what the display is.

Like , <input>, <textarea>, <select>, <object> are replacement elements that have no real content

2. Non-replacement elements

Most of the HTML is a non-replacement element, and the browser directly displays the contents of the tag element.

Like:<p>paper</p>.

Inline non-replacement elements

Width and height are not valid in inline non-replacement elements. The width of the inline non-replacement element box is the width of its content after rendering (before any child element is relative offset), and its height is based on the font.

<a>, <span> is inline non-replacement element

However, the floating inline non-replacement element can use width and height.

CSS replacement elements and non-replacement elements in-line non-replacement elements

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.