Home > Article > Web Front-end > What does div mean in css
"div" in css represents a selector. You can directly use the div tag selector to find HTML elements to set styles; and if it is ".div", then it represents the class attribute of a certain tag, which is class selection. device.
#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.
What does div mean in css?
A div is a tag in HTML, usually used as a container to hold other elements. In CSS, it represents a selector. You can directly use div (tag selector) to find HTML elements to set styles; and if it is .div, it represents the class attribute (class selector) of a certain tag.
How to use div tags in HTML and CSS
1. To use div, the first step is to open Notepad and enter the basic HTML structure, and include the internal HTML main body.
2. Place the dc6dce4a544fdca2df29d5ac0ea9906b tag inside the body tag. You have to remember that div is a container tag, so it must be followed by a 16b28748ea4df4d9c2150843fecfba68, like dc6dce4a544fdca2df29d5ac0ea9906b16b28748ea4df4d9c2150843fecfba68, dc6dce4a544fdca2df29d5ac0ea9906b is used to split on the page, so you can even Use the div tag in dc6dce4a544fdca2df29d5ac0ea9906b.
3. In c9ccee2e6ea535a969eb3f532ad9fe89, give dc6dce4a544fdca2df29d5ac0ea9906b an ID and set its height, width, background color, etc. You can make an ID for your dc6dce4a544fdca2df29d5ac0ea9906b using #, or just simply write the div and set it's height, width, etc. But when you have many divs, it's better to use an ID.
4. We can put in the 45a2772a6b6107b401db3c9b82c049c2 tag and write some text, and then close it with 54bdf357c58b8a65c66d7c19c8e4d114. The span tag is typically used to select a portion of a row and apply certain properties to it. However, you can use it to select more actions.
【Recommended: css video tutorial】
Code example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> </style> </head> <body> <div> <p>标题</p> <span> 内容 </span> </div> </body> </html>
The above is the detailed content of What does div mean in css. For more information, please follow other related articles on the PHP Chinese website!