Home  >  Article  >  Web Front-end  >  What does div mean? How to use div tags

What does div mean? How to use div tags

云罗郡主
云罗郡主Original
2018-10-31 14:21:1878949browse

Many novices who are just getting started don’t know much about what div means. There are divs on many websites now, so what exactly does div mean? Let's summarize how to use div tags.

What does div mean? How to use div tags

1: What does div mean?

When we open the source code of a web page, we will find that there are many divs and spans in it. It is the combination of these divs with other languages ​​that makes the web page look good. In fact, divs are used to wrap up the content. We can use divs to lay out various styles. For some, we can add the font size and font size to the divs. Color, whether the font is bold.

In fact, a div is equivalent to a container, but separate logic is placed in the div, so that it looks clearer.

Two: DIV tag usage syntax

<div class="样式"></div>

For example:

<div style="position: absolute;margin-top: 88px">
<tiles:insertAttribute name="menu"  /> 
  </div>

Three: How to use div tag

In the div cut layout, the most commonly used div tag is also the div tag. Therefore, we also describe the web page reconstruction as div plus css. In fact, there is nothing special about div. It is just that the div tag replaces the previous one. table tag, in fact, divs have their own characteristics and are unique. Usually, divs that are not styled need to occupy one row.

Four: What is the role of div

div has the function of segmentation in html. The function of segmentation and other styles is to set the layout and style of the page. The main thing is The function is to contain a block, which is sandwiched in a div and separated from the surrounding code to form a block.

The above is what does div mean? A full introduction to how to use div tags. If you want to know more about HTML video tutorial, please pay attention to php Chinese website.


The above is the detailed content of What does div mean? How to use div tags. 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