Inline Styles

suggest change

Use inline styles to apply styling to a specific element. Note that this is not optimal. Placing style rules in a <style> tag or external CSS file is encouraged in order to maintain a distinction between content and presentation.

A normal inline style overrides a normal rule from a <style> element or an external style sheet. An author !important declaration still beats a normal inline style. Relying on inline styles usually makes a project harder to maintain.

The styles in the following example apply directly to the elements to which they are attached.

<h1 style="color: green; text-decoration: underline;">Hello world!</h1>
<p style="font-size: 25px; font-family: 'Trebuchet MS';">I ♥ CSS</p>

Inline styles are generally the safest way to ensure rendering compatibility across various email clients, programs and devices, but can be time-consuming to write and a bit challenging to manage.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents