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 trialstevencooper
5,755 PointsI'm having trouble with some HTML coding for metatags
This is probably a silly question, but I've not been able to find the answer. What I'm supposed to do is: "Add a meta description to the page. Use the text found in the second paragraph: "Shirts and hats for fans of Star Wars"."
The html I'm given to work with is:
<html>
<head>
<title>Star Wars Merchandise</title>
<meta charset="utf-8">
</head>
<body>
<p>Star Wars Merchandise</p>
<p>Boba Fett Shirts</p>
<p>Available in white; sizes S-M-L-XL</p>
<p>Darth Maul Hat</p>
<p>Available in black or white at <a href="http://hats.com">Hats.com</a></p>
</body>
</html>
Now, my question is this - what is the correct way to make the meta tag description?
I tried this and it didn't work:
<html>
<head>
<title>Star Wars Merchandise</title>
<meta charset="utf-8">
<meta description="Shirts and hats for fans of Star Wars">
</head>
<body>
<p>Star Wars Merchandise</p>
<p>Boba Fett Shirts</p>
<p>Available in white; sizes S-M-L-XL</p>
<p>Darth Maul Hat</p>
<p>Available in black or white at <a href="http://hats.com">Hats.com</a></p>
</body>
</html>
It's been a while since I've written html, and I'm kinda rusty. Any help would be appreciated. Thanks in advance.
<html>
<head>
<title>Star Wars Merchandise</title>
<meta charset="utf-8">
<meta desc="Shirts and hats for fans of Star Wars">
</head>
<body>
<p>Star Wars Merchandise</p>
<p>Boba Fett Shirts</p>
<p>Available in white; sizes S-M-L-XL</p>
<p>Darth Maul Hat</p>
<p>Available in black or white at <a href="http://hats.com">Hats.com</a></p>
</body>
</html>
4 Answers
Stefan Hoffmann
24,811 PointsSorry,
<meta name="description" content="Some content" />
Stefan Hoffmann
24,811 PointsHello Stephen,
what about: <meta name="description" content="Star wars!!!" />
Best regards, Stefan
Kevin VanConant
1,833 PointsIs it my browser or is it not including the meta tag?
I've tried posting like 3 times and it won't show my code inside my comment.
Stefan Hoffmann
24,811 PointsHi Kevin,
have a look at the markdown cheatsheet.
Best regards, Stefan
Orestis Pouliasis
5,561 Points<meta content='Description goes here='description'/>
I am not really into HTML, but thats all I can recall. Hope I helped.
Kevin VanConant
1,833 PointsKevin VanConant
1,833 PointsI just seen the markdown sheet for posting code.... oh man it's been a long day.