HTML CSS Divisions


Divisions

Divisions are used in HTML to define block elements for formatting purposes. The <div></div> tags are placed within the <body></body> of the HTML document. The <div></div> tags can be used to format these blocks of HTML as follows.


<div id="myFormatID">

			This text would then be formatted as the ID "myFormatID" specifies
</div>


You can use either a Class or an ID to format a DIV block. Using a Class to format a Div black is done the same way except "class" is used instead of ID"


<div class="myFormatClass">

			This text would then be formatted as the class "myFormatCode" specifies
</div>



I hope you will join us for the next lesson Lesson 5) The CSS Box Model


Additional Resources