What is class and id and what´s the difference?
* Class and id is the design and is set in CSS- colours, fonts, background, placements, photos, navigation, links, etc.
*Class continues through out the page and id is one particular element
How to make class:
p {
text-align:
center;
}
p.song {
font-family: "American Typewriter";
font-size: 17px;
font-style: italic;
font-size: 17px;
font-style: italic;
}
p.alma {
font-family: "American Typewriter";
font-size: 25px;
font-size: 25px;
letter-spacing:
4px;
}
</style>
</head>
<body>
<h1>CHASING HIGHS</h1>
<p style="background-color: #EAFB00;" class="alma">ALMA</p>
<div><p
class="song"> </br>
Two a.m., I'm fading in the dark </br>
Like floating in the ocean </br>
An id tag includes one particular element (an image), while a class is used when we want to apply one style to multiple sections of text through a webpage.
No comments:
Post a Comment