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 trialXian Zhou
Courses Plus Student 229 PointsAnchor element in header
In the video, the teacher wrote: <header> <a href="index.html"> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> .......... when it shows in the webpage, I only see the "Designer" on top of the page with default blue colour. I don't understand since this anchor wraps two sentences, one is "Nick Pettit", one is "Designer", why it only shows "Designer" on the webpage.
1 Answer
Kathleen Sapp
12,776 PointsXian-
If I understand you correctly, you want to correct your code in your Workspace so that both Nick's name and Designer are present on the web page.
The code for that lesson that I saved in my Workspace was the following:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
</body>
</html>
Hope this is helpful.
Kathleen Sapp
12,776 Points<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <header> <a href="index.html"> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> </body> </html>
Xian Zhou
Courses Plus Student 229 PointsXian Zhou
Courses Plus Student 229 PointsI need to correct the code, the teacher wrote: