<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>csslearn.com &#187; CSS rules</title>
	<atom:link href="http://csslearn.com/tag/css-rules/feed" rel="self" type="application/rss+xml" />
	<link>http://csslearn.com</link>
	<description>learn style with style</description>
	<lastBuildDate>Mon, 01 Mar 2010 02:17:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The rules of CSS</title>
		<link>http://csslearn.com/the-rules-of-css</link>
		<comments>http://csslearn.com/the-rules-of-css#comments</comments>
		<pubDate>Tue, 24 Nov 2009 17:35:07 +0000</pubDate>
		<dc:creator>kunal</dc:creator>
				<category><![CDATA[CSS Basic]]></category>
		<category><![CDATA[CSS rules]]></category>

		<guid isPermaLink="false">http://csslearn.com/?p=23</guid>
		<description><![CDATA[Style sheets consist of a number of rules that define how various web page elements
should be displayed. Although sometimes bewildering to newcomers, CSS rules are simple
to break down. Each rule consists of a selector and a declaration. The selector begins a CSS
rule and specifies which part of the HTML document the rule will be applied [...]


Related posts:<ol><li><a href='http://csslearn.com/types-of-css-selectors' rel='bookmark' title='Permanent Link: Types of CSS selectors'>Types of CSS selectors</a> <small>In the previous example, the most basic style of selector...</small></li>
<li><a href='http://csslearn.com/css-syntax-syntax-details' rel='bookmark' title='Permanent Link: CSS Syntax &#038; Syntax Details'>CSS Syntax &#038; Syntax Details</a> <small>CSS syntax is easy. A stylesheet contains styles; a style...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Style sheets consist of a number of rules that define how various web page elements<br />
should be displayed. Although sometimes bewildering to newcomers, CSS rules are simple<br />
to break down. Each rule consists of a selector and a declaration. The selector begins a CSS<br />
rule and specifies which part of the HTML document the rule will be applied to. The declaration<br />
consists of a number of property/value pairs that set specific properties and<br />
determine how the relevant element will look. In the following example, p is the selector<br />
and everything thereafter is the declaration:<br />
p {<br />
color: blue;<br />
}<br />
As you probably know, p is the HTML tag for a paragraph. Therefore, if we attach this rule<br />
to a web page (see the section “Adding styles to a web page” later on in this chapter for<br />
how to do so), the declaration will be applied to any HTML marked up as a paragraph,<br />
thereby setting the color of said paragraphs to blue.</p>
<p><em><strong>CSS property names are not case sensitive, but it’s good to be consistent in web<br />
design—it’s highly recommended to always use lowercase. Note, though, that<br />
XML is case sensitive, so when using CSS with XHTML documents served with<br />
the proper XHTML MIME type, everything must be consistent. Also, the W3<br />
specifications recommend that CSS style sheets for XHTML should use lowercase<br />
element and attribute names.</strong></em></p>
<p>When you write CSS rules, you place the declaration within curly brackets {}. Properties<br />
and values are separated by a colon (:), and property/value pairs are terminated by a semicolon<br />
(;). Technically, you don’t have to include the final semicolon in a CSS rule, but most<br />
designers consider it good practice to do so. This makes sense—you may add<br />
property/value pairs to a rule at a later date, and if the semicolon is already there, you<br />
don’t have to remember to add it.<br />
If we want to amend our paragraph declaration and define paragraphs as bold, we can do<br />
so like this:<br />
p {<br />
color: blue;<br />
font-weight:bold;<br />
}<br />
<em><br />
<strong>You don’t have to lay out CSS rules as done in this section; rather, you can add rules<br />
as one long string. However, the formatting shown here is more readable in print.<br />
Note that in the files available for download, the formatting is changed slightly again:<br />
the property/value pairs and closing curly bracket are both tabbed inward, enabling<br />
rapid vertical scanning of a CSS document’s selectors.</strong></em></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fcsslearn.com%2Fthe-rules-of-css&amp;linkname=The%20rules%20of%20CSS"><img src="http://csslearn.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://csslearn.com/types-of-css-selectors' rel='bookmark' title='Permanent Link: Types of CSS selectors'>Types of CSS selectors</a> <small>In the previous example, the most basic style of selector...</small></li>
<li><a href='http://csslearn.com/css-syntax-syntax-details' rel='bookmark' title='Permanent Link: CSS Syntax &#038; Syntax Details'>CSS Syntax &#038; Syntax Details</a> <small>CSS syntax is easy. A stylesheet contains styles; a style...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://csslearn.com/the-rules-of-css/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
