Inline CSS (original) (raw)

Last Updated : 19 May, 2026

Inline CSS applies styles directly to HTML elements using the style attribute, allowing for quick, unique styling without external stylesheets.

**Syntax:

<tag ****style = " "**>

HTML `

This is a paragraph styled with inline CSS.

`

Scenario to Use Inline CSS

More Example of Inline CSS

Styling a Button with Inline CSS

HTML `

Click Me

`

Centering Text with Inline CSS

HTML `

Welcome to My Website

Enjoy your stay!

`

**Advantages

**Disadvantages

Best Practices for Using Inline CSS