# Inline style

CSS written on one element with the style attribute.

## What is an **inline style**?

An **inline style** is CSS written straight on one element with the `style` attribute. Quick for a test, but hard to keep tidy, so use classes instead.

```html
<p style="color: red; font-weight: bold;">Sale ends today!</p>
```

Level: Novice · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/novice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/inline-style
