WordPress Quick Tips: background color, special chars

To set special attributes of a paragraph e.g. the background, font typeface, color and size, etc enclose your paragraph in a <div> tag, e.g.:

<div style="background-color:black;color:red;font-size:0.75em;font-family:Courier">
Your paragraph goes here. It will use a Courier font, 75% of the normal size, and the text will be red on a black background...</div>

Using the above settings your text will look like this:

Your paragraph goes here. It will use a Courier font, 1.5 times the normal size, and the text will be red on a black background…



If you want to use some special symbols, like < and > literally on your page – use these special character codes:

Code
Visualized as…
&lt;
< (the “less than” symbol
&gt;
> (the “greater than” symbol)
&amp;
& (the ampersand symbol)
&nbsp;
  (a space)
&quot;
" (a double-quote)

One thought on “WordPress Quick Tips: background color, special chars

Leave a Reply

Your email address will not be published. Required fields are marked *