CSS - Specific Selector in CSS
In this video,I explained the Specific Selector in CSS. Feel free to comment. For more, please subscribe and press the BELL icon. Please visit my CSS Playlist . Please link, comment, share and subscribe. The code is as follows -
HTML File -
<html>
<head>
<title> Specific Selector </title>
<link rel="stylesheet" href="specific.css">
<style>
p.center {
text-align: center;
}
i#id {
color:red;
}
</style>
</head>
<body>
<h1 class="center"> This is the H1 tag </h1>
<p class="center"> This is the Paragraph tag </p>
<b id="id"> This is the bold text </b>
<i id="id"> This is the italic text </i>
</body>
</html>
CSS File -
p.center {
color: green;
}
i#id {
font-size:25px;
}
HTML File -
<html>
<head>
<title> Specific Selector </title>
<link rel="stylesheet" href="specific.css">
<style>
p.center {
text-align: center;
}
i#id {
color:red;
}
</style>
</head>
<body>
<h1 class="center"> This is the H1 tag </h1>
<p class="center"> This is the Paragraph tag </p>
<b id="id"> This is the bold text </b>
<i id="id"> This is the italic text </i>
</body>
</html>
CSS File -
p.center {
color: green;
}
i#id {
font-size:25px;
}
Comments
Post a Comment