Publishers of technology books, eBooks, and videos for creative people

Home > Articles

  • Print
  • + Share This
This chapter is from the book

Naming Elements

You can give your HTML elements either a unique name or one that identifies them as belonging to a particular class. You can then apply styles to all elements with a given name.

To name unique elements

Within the opening tag of the element, type id="name", where name uniquely identifies the element.

To name groups of elements

Within the opening tag of the element, type class="name", where name is the identifying name of the class.

  • + Share This
  • 🔖 Save To Your Account