They are used to combine a large chunk of HTML code with certain information, most of which are associated with elements using Class attribute class and Identity attribute ID, see CSS Intermediate Guide class and ID selector.
The difference between span and p is that span is inline, used in a small piece of inline HTML, and P (think of what pision means) the element is block-level (in a nutshell, it is equivalent to a break before and after it) and is used to assemble a chunk of code.
This is crazy
In practice, p, in particular span, should not be abused, despite other conflicting views. For example, you want to emphasize the word "crazy" and The Bold class "paper", which may be used in this code:
This is
crazy
It is better to practice than to add a span.
There is no clue to class classes and ID IDs? Don't worry, you'll be exposed to them in the CSS Intermediate Guide. All you need to remember is that span and p are "meaningless" tags.
The above is the Web page of the difference between span and div _ experience Exchange content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!