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 trialHenry Brenton
10,144 PointsAddition of meta tag makes loads of my HTML highlight in red - video followed
Hi all, I've followed the video, and when it came to adding the meta tag for controlling the viewport towards the end of the video ('meta name="viewport" content="width=device-width", initial-scale=1.0">') the '=' sign between 'initial-scale' and '1.0' was suddenly highlighted red, as was a large portion of my code beneath it, from the '</head>' through to the </html> at the end of the page.
Specifically, all of the anchor elements, the h1 and h2 elements, and the " class=" sections have been highlighted in red as well as my twitter handle.
Has anybody had this problem before, and might you know what's going on, and how to remedy this problem?
Many Thanks in advance
Henry
1 Answer
joelmneskld
3,993 PointsHi Henry, the reason for this might be because there are too many (" and ') where there should not be any. This is how the correct meta tag looks for this one: <meta name="viewport" content="width=device-width, initial-scale=1.0">
This one will give you error: <meta name="viewport" content="width=device-width", initial-scale=1.0">
There are lots of code editors that will help you highlight this. I would recommend you to use Visual Studio Code.
Hope this helps /Joel
Henry Brenton
10,144 PointsHenry Brenton
10,144 PointsThat worked - thank you Joel!