Home >Web Front-end >CSS Tutorial >What is an inline element in css

What is an inline element in css

藏色散人
藏色散人Original
2021-02-03 10:44:153866browse

Inline elements in css are also called inline elements; inline elements include tags commonly used in layout such as a, span, em, b, strong, i, etc.; inline elements and their sibling elements The spaces are next to each other, and they are displayed in order from left to right on the same line, and do not occupy a separate line.

What is an inline element in css

The operating environment of this article: windows7 system, css3 version, Dell G3 computer.

1. What is an inline element?

Inline elements have many names, such as inline elements, inline elements, inline elements, inline elements, etc., which correspond to block-level elements. An inline element and its sibling elements are displayed next to each other on the same line in order from left to right, and do not occupy a separate line.

2. Characteristics of inline elements

(1) On the same line as other sibling elements, no need to start a new line

(2) Width Neither the height nor the margins to the top and bottom can be set

(3) The width is squeezed by the content, that is, its width is the width of its content

(4) It can only accommodate the content Inline elements and text are usually included in block-level elements.

Recommended: "css video tutorial"

3. Common inline elements

a – 锚点
img – 图片
input – 输入框
span – 常用内联容器,定义文本内区块
b – 粗体(不推荐)
big – 大字体
br – 换行
em – 强调
font – 字体设定(不推荐)
i– 斜体
s – 中划线(不推荐)
select – 项目选择
small – 小字体文本
strike – 中划线
strong – 粗体强调
sub – 下标
sup – 上标
textarea– 多行文本输入框
u – 下划线

The above is the detailed content of What is an inline element in css. 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:How to copy web page cssNext article:How to copy web page css