The difference between span and Div in a webpage _ Experience Exchange

Source: Internet
Author: User
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)!

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.