Search This Blog

Sunday, November 02, 2008

Short Introduction to inline CSS

CSS is short for Cascading Style Sheets and is used for controlling the presentation (fonts, colors and layout) of documents written in Markup Languages like HTML, XHTML and XML such as blogs. CSS can be written in a separate document called from the template, written in the template itself or written within this post itself (inline CSS).

For example, the HTML tag for a paragraph is <p>. Now suppose we want the paragraph below to stand out from the rest of this post by adding background color, we can do that by using inline CSS.

The hexadecimal color code for the background color of this paragraph is #FFD4FF. I obtained this hexadecimal color code by using a free tool ColorPic. I set the color of this paragraph to have a different background color by surrounding the text I am now typing with the a pair of HTML tag for paragraph <p style="color:#FFD4FF;"> and </p>. To make this clearer, I will display what I am now typing by making this into a graphic and upload it as an image below for you to study:

HTML tag for paragraph and inline CSS for background color

Well, the text in the above image is a bit small. To make it clearer, I will redo the graphic below so the text is larger and clearer:

HTML tag for paragraph and inline CSS for background color
Related Posts Plugin for WordPress, Blogger...

Find topics by using the Google custom search box above which can search multiple blogs, or the SEARCH BLOG in the left corner of navbar. You can also find topics in the Label List and Categrories in the right sidebar.

For more information and special deals related to any of the issues on this page, place your cursor over the double-underlined links. All information supplied by

Disclaimer: This blog has no relation with Wiley Publications