easy
CSS Easy​
What is CSS?
CSS stand for Cascading Style Sheets
.
used to design webpages and control the visual appearance of HTML elements.
CSS describe how HTML element are to be displayed on screen, paper, or in other media.
A style langugae that defines how an html document is displayed.
What are the various selectors available in CSS?
CSS selectors are used to select HTML element that you want to style. There are different types of CSS selectors.
Tagname selector: Tagname selector select attribute by tag for example: h1,h2,p.
<h1>good</h1>
<style>
h1 {
color: yellow;
}
</style>
Classname selector: The .class selector selects element with a specific class attribute.
<p classname="main-heading">good morning</p>
<h2 classname="main-heading">hii frends</h2>
<style>
.main-heading {
background-color: green;
}
</style>
ID selector: The ID selector select element based on thir ID
<h1 id="container">hii</h1>
<style>
#container {
color: yellow;
}
</style>