Classing Block Elements
HTML - Div Element(s) The
tag is nothing more than a container unit that encapsulates other page elements and divides the HTML document into sections. Web developers use <div> elements to group together HTML elements and apply CSS styles to many elements at once. The
tag defines a division or a section in an HTML document. The
tag is used to group block-elements to format them with CSS.
<!DOCTYPE html> <html> <head>
{ background-color:black; color:white; margin:20px; padding:20px; }
</head> <body>
Here div.cities is styled with css.

<div class="cities">
<h2< London/h2> <p< London is the capital city of England.</p> </div> </body> </html>
Well, thats HTML and CSS - they need to work together to make nice webpages...
Try this code:
<!DOCTYPE html> <html> <body> <p>This is some text.</p> <div style="color:#0000FF"> <h3>This is a heading in a div element</h3> <p>This is some text in a div element.</p> </div> <p>This is some text.</p> </body> </html> div