Home  >  Article  >  Web Front-end  >  What is the difference between css and div

What is the difference between css and div

coldplay.xixi
coldplay.xixiOriginal
2020-11-13 15:29:394984browse

The difference between css and div: 1. The div tag can define a partition or section in the document, which is used to define a separated block or a region in the HTML document; 2. CSS is a method used to express Computer languages ​​for file formats such as HTML or XML.

What is the difference between css and div

(Recommended tutorial: css video tutorial)

div is an html tag## The

#dc6dce4a544fdca2df29d5ac0ea9906b tag can define a division or section (division/section) in the document, and is used to define a separated block or a regional part in the HTML document. The

dc6dce4a544fdca2df29d5ac0ea9906b tag is often used to group block-level elements so that they can be formatted with CSS.

dc6dce4a544fdca2df29d5ac0ea9906b tag can divide the document into independent and different parts. It can be used as a strict organizational tool and does not use any formatting associated with it. If dc6dce4a544fdca2df29d5ac0ea9906b is marked with an id or class, the tag becomes more effective.

CSS refers to Cascading Style Sheet

CSS is a computer language used to express the style of documents such as HTML or XML. CSS can not only statically modify web pages, but can also cooperate with various scripting languages ​​to dynamically format various elements of web pages.

CSS can perform pixel-level precise control over the layout of element positions in web pages, supports almost all font size styles, and has the ability to edit web page objects and model styles.

div syntax:

<div>内容</div>

css syntax:

.abc{设置CSS格局}
#bbb{配置CSS花样}

Next, use class or id in the div to introduce the corresponding CSS format within the curly braces.

<div class="abc">内容</div>
<div id="bbb">内容</div>

Example:

div tag application:

<div>内容</div>

css:

div{font-size:20px}

The font size within the above configured div tag is 20px

CSS can be used to decorate divs, for example: div is a person and css is clothes.

The above is the detailed content of What is the difference between css and div. 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