Techcss
Untitled Document

CSS Block elements

Division

Division is a block level HTML element used to define sections of an HTML file. A division can contain all the structural parts of our website including additional divisions, spans, images, text and so on.
We define a division under the <body> section.

<div>
contents / nested <div> / <span> / <table> etc. may laid here
</div>

Defining div with class or Id:

<div id="container">
Web contents can be placed here
</div>

A division creates a linebreak by default.


Span

Span do the very similar work as divisions, though having some functional dissimilarities.

Example:

This <span style="color:#6600CC; text-decoration:line-through">text is styled</span> by span

Output:

This text is styled by span