Topic: CSS Basics

div element – HTML


To group multiple elements together and style them, use the div element with a class or id attribute:

<div class="my-class">
  <p>The heading element and this paragraph will share similar styles.</p> 

To view the full tutorial, sign up for a free trial on our Sign Up page.