Introduction to div and span in HTML

Source: Internet
Author: User
Tags version control system
Introduction to DIV and span in HTML

In the development of HTML, the two tags of div and span can be said to be the tags that we often use, the semantics of Div is division "split", and span's semantics is span "scope, span". div tags in html

Div is the positioning technology in cascading style sheets, the full name division, that is, the division. Sometimes it can be called a layer.
A DIV element is an element that provides a structure and context for the content of a chunk (Block-level) within the HTML (one application under standard Universal Markup Language). Used to combine block-level elements to format these elements through a style sheet.

Next, use the code to initially perceive

<! DOCTYPE html>

Div in the browser, the default is not to add any effect changes, but the semantics changed, all the elements in the div is a small area.
Div tag is a container-level tag, where everything can be placed, even can put div itself. span labels in HTML

Span is also a label that expresses "small area, small span," but is a "text-level" label.
That is, only text, pictures, and form elements can be placed within span. Span inside can not put P, H, UL, DL, OL, Div.

span inside is to place small elements, div inside place big things :

<! 
    DOCTYPE html>  

Here is simply very simple to introduce the next Div and span, in the future of the CSS article we are slowly familiar with them

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.