csn anyone tell me are we suppose to use link tag in css or is it <a> tag as we do in html I mean are they different because in secomd section for inline embedded and external css it is using link so are they different | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

csn anyone tell me are we suppose to use link tag in css or is it <a> tag as we do in html I mean are they different because in secomd section for inline embedded and external css it is using link so are they different

5th Nov 2016, 10:08 PM
amad
4 Answers
0
Not sure what you mean. In html you can use: <a href='youbloodyurl.com'></a> to link something. Then in css you can write the following: a { color: pink; } To change the color of your links. If you are talking about the external css file, style tag and inline styling then, actually they are one and the same. The difference is the order in which they are executed and which styling has the final say. Usually inline style sheet are overriding the others, unless you added !important into an external style sheet proprety ...
5th Nov 2016, 11:40 PM
Sergiu Lucec
Sergiu Lucec - avatar
0
you getting me right but if ypu see the course section it is using link word to link css file so there I am thinking to use a as we do in html so thats what I am trying to figure out hope its making sense
6th Nov 2016, 12:04 AM
amad
0
On this website the css section is probably already linked to the html page. So you don't need your link tags. But normally you have to put a link tag in your html page that includes the location of the css file. for exemple: <link rel="stylesheet" type="text/css" href="mystylesheet.css"> So the href will show what location to browse the css file in. The external javascript file or files also need to be linked in your html page. Instead of link you use script tag: <script type="text/javascript" src="myscript.js"></script> The a tag is only used to link external links. You don't link your css file with it to include the style sheet's functionality. For example: <a href='twitter.com/myprofile>Click here to check out my twitter page</a> If you write a page offline in Brackets for example, you have your index.html file where you add your link and script tag that link to external files.
7th Nov 2016, 8:00 PM
Sergiu Lucec
Sergiu Lucec - avatar
- 2
p
7th Nov 2016, 6:44 PM
Ernesto Carvajal
Ernesto Carvajal - avatar