Everything I've learned in Book 2! Page 4

Coding with class!

Id's:

Quotes:

The secret of success is consistency of purpose.

-Benjamin Disraeli

I can see how it might be possible for a man to look down upon the earth and be an atheist,
but I cannot conceive how he could look up into the heavens and say there is no God.

-Abraham Lincoln

When using the id #, use [p id=""]
When using the class . use [p class=""]

Classes:

Questions:

Why are ghosts bad liars?

Because you can see right through them!

When using the classes you can combined two or more. look at the next example:

This paragraph is Green!

This paragraph is sized!

This Paragraph is both Green and Sized!

This is [p.fancy] class. It is limited to paragraphs.
when you use this class it only pertains to paragraphs.
Whereas [.fancy] class can be attached to any element you choose.


Div and Span:

Div:
Has carriage returns before and after it's use.
Usually Div is used for groups of paragraphs in a series.

Span:
Does not have carriage returns.
Usually embedded into elements.
*special formatting to elements.

This is span in use.

This is span, which is an in-line elements modifier.
Notice the Red Div and Green HTML in the paragraphs, that is Span!

I can use Div any where now in HTML

check the code to see the use of div!


Class and Style with CSS continued Next Page



Back Home