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 trial
Ben Wilburn
1,307 Pointsideas on why my <h2> tags make my code not show up?
When I include <h2> tags in my sentence string, it does not print to the page, but when I exclude the <h2> tags it prints like its supposed to. Does anyone have ideas on why this is happening?
2 Answers
Steven Parker
243,658 PointsWithout seeing the code I can only guess, but perhaps there are some styles applied to H2 elements that would affect the display?
Here is an (admittedly frivolous) example:
h2 { display: none; }
Share your code (or a link to a workspace snapshot) to enable a more pertinent answer.
Rohit Tolawat
8,277 PointsAlthough it wont be clear unless the code is shared. In addition to Steve's suggestion. Also check if you have closed the <h2> tag using </h2>. Headline tags are not self-closing. A typical example of h2 tag is: <h2>Hello</h2>
Julian Gutierrez
19,325 PointsJulian Gutierrez
19,325 PointsPlease include your code so we can see where you may be going wrong.