When to use id or class in HTML

When should you use ID or class in HTML

If you read my recent article on “What is a class HTML?” you may have wondered when to use “id” or class in HTML. This article will unpack that answer and give you a few guidelines when using ids in HTML. Attributes are added to elements in an HTML document to facilitate styling through CSS […]

What is a class in HTML?

What is a class in HTML

When you start with Basic HTML, most of your coding would be in generic <div> tags with inline styling and no CSS files. As you get more comfortable with HTML, you will come across classes. But what is a class in HTML, and why should we use them? Class attributes are added to HTML files […]