what is happenning i dont understand
I have declare two link element but my code is not running
Describe your issue in detail here.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800">
<link href="styles.css">
<meta charset="UTF-8">
<title>Nutrition Label</title>
</head>
<body>
<h1>Nutrition Facts</h1>
<p>8 servings per container</p>
<p>Serving size 2/3 cup (55g)</p>
</body>
</html>
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Learn Typography by Building a Nutrition Label - Step 4
Link to the challenge:
second link should contain rel attribute too
not working brooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
hbar1st
December 23, 2022, 10:23am
4
What did you write? (Pls show the new code)
removed href = “styles.css” in 2nd link element and added rel = “styles.css”
Hey! Can you please copy paste your code as it is now so its easier for others to help you!
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800"/>
<link rel="styles.css"/>
<meta charset="UTF-8">
<title>Nutrition Label</title>
</head>
<body>
<h1>Nutrition Facts</h1>
<p>8 servings per container</p>
<p>Serving size 2/3 cup (55g)</p>
</body>
</html>
avishekgop5833:
css
you need to add rel =" stylesheet" in the same line.
avishekgop5833:
<link href="styles.css">
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
hbar1st
December 23, 2022, 5:33pm
10
avishekgop5833:
<link rel="styles.css"/>
the link element needs two attributes.
the rel=“stylesheet” part and the href=“styles.css” part