-
Listen, folks.
The CSS properties are never-ending.
-
Let me show you a few more.
-
What if I want to change
-
the spacing between the lines
in my song lyrics?
-
I could use the `line-height` property,
-
and specify something like 15px.
-
Or maybe better would be 1.5em,
that makes the line height
-
150 percent of whatever the text size was.
-
What if I want my song lyrics to be
center-aligned?
-
I could use the `text-align` property,
and specifiy `center`.
-
I could also change it
to `right`, or `justified`,
-
though I think that would look a bit odd.
-
What if I want to underline
my main paragraph?
-
I could use the
`text-decoration` property
-
and specify `underline`.
-
What if I want to remove the underline
from my links,
-
like that link to Wikipedia?
-
Well, the browser has
a default set of styles
-
that it applies to everything.
-
Like `text-decoration: underline`
for links.
-
But we can use CSS to override
the browser's default styles,
-
and say `text-decoration: none`.
-
Just add this rule here:
a { text-decoration: none; }
-
And you see now
it's no longer underlined.
-
But we should be careful when we do that,
-
because the defaults
are usually picked for a reason.
-
If links aren't underlined,
how will people know that they're links?
-
What if they never click them because
they think they're just normal text?
-
If we do remove that underline,
we should be making sure
-
that the links look
significantly different in some other way.
-
Otherwise, we'll make users sad.
-
And sad users make me sad.
-
They should make you sad, too.
-
I could tell you
about text properties all day.
-
But I won't, because
we have so much more to cover.
-
There are hundreds of CSS properties.
-
And browsers are adding more
every year.
-
I probably won't ever tell you
about all of them.
-
But hopefully I can tell you enough
to get you excited.
-
And then if you're wondering
if there's a CSS property for some style
-
and it's not in our documentation here,
-
you can just visit
your local search engine and find out.
-
For example, if you're wondering
-
if there's a way
to add a drop-shadow to your text,
-
just search "CSS text shadow"
on the Internet,
-
and you'll see lots of results.
-
Generally, being able
to search the Internet
-
for answers to your questions
-
is a really important skill
for a web developer.
-
Because so many people
have had the same questions as you,
-
and 99.9 percent of the time,
the answer is out there.
-
You just have to get good at finding it.