146k views
2 votes
Which type of css style is best used to format only a single element on a single page in a site?

User Griable
by
8.3k points

1 Answer

4 votes
Inline CSS is the answer you're looking for, and is generally not good practice to use consistently, as it creates a lot of unnecessary clutter and mess. Prefer external CSS, or at the very least internal CSS.

Inline CSS is when you modify the element itself, rather than selecting classes, IDs and elements like you would with internal or external CSS.

The follow HTML and CSS would cause the paragraph to have red text:

<p>
Hello World!
</p>
User TibiG
by
9.2k points

No related questions found