how to link css files to html page with p, .class1,#my id selectors

Posted by Manideepgoud under HTML 5 on 6/16/2015 | Points: 10 | Views : 933 | Status : [Member] | Replies : 3
how to apply css codes p,.class1 and #myid and where to add to html page




Responses

Posted by: A2H on: 6/16/2015 [Member] [MVP] Silver | Points: 25

Up
0
Down
Are you looking for an option to link external css stylesheet to your page. If so then you can use the Link tag to add the style sheet to your page. You can put this tag inside the head tag of your page
<link href="/styles/CommonStyles.css" rel="stylesheet" type="text/css" />

Change the style sheet path accordingly.

Thanks,
A2H
My Blog

Manideepgoud, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pritambhatta on: 10/11/2019 [Member] Starter | Points: 25

Up
0
Down
Great Information was very useful for me..

Manideepgoud, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Siddhipatel on: 2/19/2020 [Member] Starter | Points: 25

Up
0
Down
Hello..
Write code like this you can make css for your selectors.
<html>
<title></title>
<head>
<style>
p
{
//Write styles for "P".
}

#myid
{
//Write styles for "Myid"
}
.class1
{
//Write code for "Class1".
}
</style>
</head>
//Apply it by its id,class and tags.
<body>
</body>
</html>


Also write css styles in different file and include it by writing this code in head section

<link href="Enter path of CSS file" rel="stylesheet" type="text/css" />


Software Developer at iFour Technolab Pvt Ltd

Manideepgoud, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response