🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to CSS Notes
Topic #8

Add Inline Style


Inline CSS

An inline style may be used to apply a unique style for a single element.

To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property.

Example

  <!DOCTYPE html>
<html>
<body>

<h1 style="color:blue;text-align:center;">This
  is a heading</h1>
<p style="color:red;">This is a paragraph.</p>

  </body>
</html>

Tip: An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly.

Want to go beyond the notes?

Join CodingNow 2.0's CSS course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Add Inline Style – FAQs

Quick answers about learning Add Inline Style in CSS.

This free note from CodingNow 2.0 explains Add Inline Style in CSS — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every CSS topic on CodingNow 2.0, including Add Inline Style, is 100% free with no signup required.
With focused practice, most students grasp Add Inline Style in 1–3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) — expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now