In this DaddyDev lesson, Ryan E. Hamilton teaches the kiddos about HTML Divisions, or the <div> tag!

An HTML Division defines a division or a section in an HTML document. HTML Divisions are often used together with [CSS] styles, to layout a web page.

HTML Divisions are great all-purpose containers that can hold or wrap any other collection of HTML Elements (e.g. headers, paragraphs, images, links, and even other divisions). They can hold pretty much anything!

They are also used all of the time in basic HTML game development.

Enjoy! 8)

DaddyDev 13: HTML Divisions

Sample Code

<html> 	 	<head> 	</head>  	<body> 		 		<div style="width: 400; 		height: 300; 		background-color: red; 		color: white; 		border: 3px solid black; 		border-radius: 7px; 		padding: 7px;">  			<h1>The Good Boy</h1> 			<p>Once upon a time, there was a very good boy. All he wanted to do was play video games all day.</p> 			<p><a href="http://daddydev.com">He learned how to code.</a></p> 			<p><strong>THE END</strong></p> 			 		</div>  	</body> 	 </html>

Code View

DaddyDev 13: HTML Divisions

Browser View

DaddyDev 13: HTML Divisions