- Code: Select all
a
{
color: black;
}
Right?
Well defining a tag specific for a class is essentially quite the same and much more useful
To create one, instead of typing in a, or linkClass, you use the name .linkClass
- Code: Select all
.linkClass
{
color: yellow;
}
This would make any text that you add this tag to, yellow. for example
- Code: Select all
<a href="http://CCGames.tk" class=linkClass>CCGames.tk</a>
Would output a yellow link:
CCGames.tk
- Code: Select all
<span class=linkClass>YELLOW TEXT</span>
Now, you can also do the same thing, except with ids! Rather than ".," you replace it with "#"
For example
- Code: Select all
#linkId
{
color: yellow;
}
Would produce yellow text with the following code
- Code: Select all
<span id=linkId>YELLOW TEXT</span>
Now lets say that you want to get advanced! Let's say you only want an id to turn a certain color if it is in a specific id.
- Code: Select all
#red
{
color: red;
}
#red blue
{
color: blue;
}
Here is an example of the results
- Code: Select all
<span id=blue>Not-Blue,</span><span id=red>RedText,<span id=blue>BlueText</span></span>
This would output something like this:
Not-Blue,RedText,BlueText
Hope i helped, and feel free to ask questions on this forum!


