Call using tag:
We can call a css using the tag like below.
Call using id:
We can call a css using the id like below and the css will be applied to the particular attribute with this particular id.
And in html file
We can call a css using the attribute 'class' like below and the css will be applied to the particular attribute with this particular class attribute.
And in html file
We can call a css using the tag like below.
td {
padding: 5px;
text-align: left;
background-color: #F2F2F2;
}
Here all the attribute with td tag will be formatted with this css.Call using id:
We can call a css using the id like below and the css will be applied to the particular attribute with this particular id.
#p1
{
background-color: #00FF00;
padding: 2px;
}
Here all the attribute with td id 'p1' will be formatted with this css and while using id we should call id starting with a
hash (#).
And in html file
<div>Call using class:This call calls using id
</div>
We can call a css using the attribute 'class' like below and the css will be applied to the particular attribute with this particular class attribute.
.p1
{
background-color: #00FF00;
padding: 2px;
}
Here all the attribute with td id 'p1' will be formatted with this css and while using id we should call id starting with a
dot(.).
And in html file
<div>This call calls using class
</div>
Comments
Post a Comment