Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLewis Cosmollis
Front End Web Development Techdegree Student 4,121 Pointswhy isn't work sans showing up?
I've done what it asked I'll put my code here
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Lake Tahoe</title> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,700;1,300&display=swap" rel="stylesheet"> <link rel="stylesheet" href="css/style.css"> </head> <body>
and the CSS
body{ font-family: 'Work Sans', sans-serif; color:#454959; font-weight:300; }
1 Answer
Peter Vann
36,427 PointsHi Lewis!
This worked for me:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lake Tahoe</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,700;1,300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<style>
body {
font-family: 'Work Sans', sans-serif;
color:#454959;
font-weight:300;
}
</style>
</head>
<body>
Example Text
</body>
</html>
I didn't know if your body declaration was in the style.css file or not, if it is and not working then it is likely to be a file path problem.
In that case try these:
<link rel="stylesheet" href="/css/style.css">
Or
<link rel="stylesheet" href="./css/style.css">
Etc...
I hope that helps.
Stay safe and happy coding!