-3

help me understand how to get two defferent links of css with same (rel) like "stylesheet"

li:hover {color: green;}

.nothing {color: purple;}
p {font-family:monospace;}
.new_font {
        font-family: 'Tangerine', serif;
        font-size: 48px;}
body {  text-shadow: 8px 8px 8px #aaa;}
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Notes File</title>

  <link rel="stylesheet" href="style.css";>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
 

</head>

</html>
Temani Afif
  • 245,468
  • 26
  • 309
  • 415
  • If your question is *small* why putting a **lot** of code? – Temani Afif Sep 20 '19 at 21:34
  • i tried putting just the head it said error – Bodas Sabry Sep 20 '19 at 21:35
  • @BodasSabry: *"i tried putting just the head"* - We don't know what you mean by that. *"it said error"* - If you're getting an error, try reading the error message. It's telling you what's wrong. – David Sep 20 '19 at 21:36
  • i fixed the problem and im sry for this bro – Bodas Sabry Sep 20 '19 at 21:37
  • @BodasSabry: If the problem has been corrected and you are no longer in need of assistance then you are encouraged to delete this incomplete question. – David Sep 20 '19 at 21:38
  • brooo i mean i fixed the problem of the long code post not my question – Bodas Sabry Sep 20 '19 at 21:40
  • @BodasSabry: Please, spend less time focusing on using the word "bro" and more time clarifying the problem you're trying to describe and the question you're trying to ask. What specifically isn't working in the code you've posted? – David Sep 20 '19 at 21:41
  • it don't do both actions like getting the style.css stuff and the font at same time – Bodas Sabry Sep 20 '19 at 21:46
  • @BodasSabry: Sure it does. Open your browser's debugging tools when you run the above code snippet and observe network requests being made for both of those resources. Of course, `style.css` is a 404 error since it doesn't exist at the relative URL specified in the question. (Since it's a code snippet the styling is applied from the CSS code block.) Though of course no styling is being applied to any of the page content in the code snippet because, well, there isn't any content. (Observe the lack of a `` element in the HTML.) Whatever you think the problem is, it's still not clear. – David Sep 20 '19 at 21:48
  • okay... my Q is so clear and i didn't upload all the code cause it does no matter and the style.css is in same directory and it worked until i put the other link for the font... got something???? – Bodas Sabry Sep 20 '19 at 21:53
  • *"my Q is so clear"* - Just saying that your question is clear doesn't make it clear. *"i didn't upload all the code cause it does no matter"* - Demonstrating the problem so we can see an example of it does indeed matter. *"it worked until i put the other link for the font"* - You are encouraged to describe what "doesn't work" in your code. It's not obvious from looking at it. When you view your page, what actual problem do you observe? – David Sep 20 '19 at 22:01
  • @David i haven't read all the comments in depth because they're so annoying, but it *is* clear that you missed the point from the very beginning. – wazz Sep 20 '19 at 22:31

1 Answers1

1

Swap the order of your <link> tags so that the font info is already included before your regular stylesheet is loaded:

[... inside the head tag ...]
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="stylesheet" href="style.css";>
Johannes
  • 64,305
  • 18
  • 73
  • 130