Multiple choice technology web technology

Which HTML attribute is used to define inline styles?

  1. class

  2. style

  3. styles

  4. font

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The style attribute is used to define inline CSS styles directly on HTML elements. For example:

. Option A (class) is for class names, not inline styles. Option C (styles) is not a valid attribute. Option D (font) is not the correct attribute for general styling.