13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.130 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.1313:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.13

.

.

Wednesday, November 23, 2011

CSS HTML -Demonstration - Classes in CSS

<html>
<head>

<style type="text/css">
div{
color:green;
}
p{
color:black;
}
p.ex1
{
font:15px arial;
color: red;
}

p.ex2
{
font:italic bold 10px/40px Georgia,serif;
color: blue;
}
</style>
</head>

<body><div>I want to know
<p>what time</p>
<p class="ex1">This is a sentence.</p>
<p class="ex2">This is another sentence.</p></div>
</body>
</html>


The text below displays what the text above causes to be rendered on a web page. What you need to observe in this demonstration is that what follows the "p" in the CSS script is formatting is displayed with in all &lt;p&gt; tag is displayed within the &lt;p&gt; &amp; &lt;/p&gt;.&nbsp; These are "nodes", in XML, HTML OR XHMTL.

So, the &lt;p&gt; must be closed before another primary node can be created. What follows the "p." in the CSS file is referred to as a "class".&nbsp; These classes on sub "p" tags basically cause an "override" of the formatting attributed to the &lt;p&gt; tag.

That's the purpose of classes; it brings about/causes a sub-formatting within the pre-determined formatting of a paragraph.

Yes, you could do this all individually inline, but the purpose of this demonstration is to demonstrate the existence of the said concept.

Note: This blog distorted the color minimally, but you can still look at the source code, the result & grasp the (css) class and understand how it causes subformatting.


I want to know
what time
This is a sentence.
This is another sentence.