css-Learn (1)

Source: Internet
Author: User

Elements
Elements are the basis of the document structure. Each element in the document has a certain effect on the presentation of the document. In CSS, at least in CSS2.1, this means that each element generates a box (box, also called a box) that contains the contents of the element.

Replacement and non-replacement elements

In CSS, elements usually have two forms, substitution, and non-substitution.

Replace element

A replacement element is a portion of the content of an element that is replaced by an image file other than the document itself, such as an IMG element, which is not directly represented by the contents of the document.

This tag does not contain any specific content, only one element name, IMG, and an attribute, unless it points to an external content, otherwise this element has no meaning. The input element is similar to it, depending on the type of INPUT element.

Non-replacement elements

Most elements are non-replacement elements whose contents are displayed by the user agent (usually a browser) in the box generated by the element itself.

<span>hi there</span>

Text Hi there will be displayed by the user agent

Element Display role

Dealing with substitution and non-replacement elements, css2.1 also uses two other basic elements: block-level and inline elements

Block-level elements

A block-level element generates a box that fills the content area of its parent element.

A list item is a special case of a block-level element that, in addition to being consistent with other elements, produces a marker-the list item is usually a dot in an unordered table, and a sequence table is a number.

In-line elements

Link tag

<link rel= "stylesheet" type= "Text/css" href= "Sheet1.css media=" All ">

Rel (relation): relationship

Type: Types of data loaded using the link tag.

css-Learn (1)

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.