Home  >  Article  >  Web Front-end  >  html block element

html block element

无忌哥哥
无忌哥哥Original
2018-06-29 10:13:172504browse

There are many block elements. Here we will introduce two very simple and commonly used ones: dc6dce4a544fdca2df29d5ac0ea9906b and 45a2772a6b6107b401db3c9b82c049c2

div: also called block element, without any style, is used to divide the page. Ribbon.

span: Also called inline element, it also has no style and is usually used as a container for label content.

So the question is?

What? Is it a block element? It automatically occupies a line, which is equivalent to adding a carriage return0c6dc11e160d3b678d68754cc175188a at the end of the element.

The characteristic is that the width and height can be set, so it is very suitable for page layout

What Is it an inline element? All inline elements are displayed in one line. If the line cannot be displayed, the line will break, so it is also called an inline element, because it is naturally used to display the content of the web page, so the width and height cannot be set. Its width and height are determined by its internal elements, such as text,

images, form controls, etc. Of course, it does not need to set the width and height.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>2.区块</title>
</head>
<body>
<div>
<span>今天是个好天气</span><img src="../images/10.png" height="200">
</div>
</body>
</html>

The above is the detailed content of html block element. 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:html list quick previewNext article:html list quick preview