Inline CSS – How to style text within your web pages

Do you need to quickly style the text within your web pages with CSS?

Answer: Use css inline tags

Normally the best way to use CSS is an external style sheet. It allows you to easily style the web pages throughout your whole site by editing one file however sometimes you just need to style one heading or paragraph (not the whole page or pages).

Why use inline css?

Recently I had to do a quick update to a WordPress web site. Unfortunately the standard WP web editor does not allow you to enlarge the font and I had no time to search/edit the external style sheet.

Here’s the css inline styling I used to create large text:


<p style="font-size:20px; font-weight:bold; color: #000;">Introduction</p>

Here’s how it’s displayed:

Introduction

Features of inline css

* Allows you to insert the CSS within the HTML code.
* Overrides the styles that are defined in an external CSS.

Resources:

http://www.tizag.com/cssT/inline.php