+ 2
How to use class="one two" ?, Please give me example.
CSS class
4 odpowiedzi
+ 4
HTML:
<div class = "c1 c2">
yay
</div>
CSS:
.c1 {
color: green;
}
.c2 {
background: red;
}
It will have green text color & red background.
Very complicated.
+ 1
Any tag in HTML can have an id and a class attribute.
You can use those to make JS and CSS to access certain tags, by 3 different main things:
name (tag name)
id
class
With name you can target any tags of the same name. You can for example specify every paragraph element <p></p> to be red.
id is an identifier for a tag, not 2 tags can have the same identifier, but you can use it to specify 1 certain element.
class is a group for a tag, similar to id, but same class can be given for multiple individual elements.
+ 1
Airree thx
+ 1
Seb TheS thx