This article will help you understand and use "div" and "span" in CSS and HTML, and style them with CSS. The main purpose of using "div" is to divide the main body into smaller parts, while "span" is used to define an area within a row.
One: 1. Use div
in 1.html to open Notepad and type in the basic HTML structure. It basically contains the body inside the HTML.
2. Place the
Two: 1. In
You can use # to make an ID for your
2. Use span
to put the tag and write some text, then close it with . 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 multiple rows.
Tip:
Always remember that
You can create one big
You can use
The above is a complete introduction to how to use DIV and span in HTML and CSS. If you want to know more about CSS3 tutorial, please pay attention to the php Chinese website.
The above is the detailed content of How to use DIV and span in HTML and CSS?. For more information, please follow other related articles on the PHP Chinese website!