I'm working on an HTML project for my Web Development Class, about to submit it, and I'm getting an odd validation error on one of my html documents.
The validator is having an issue with one of my <p> tags, even though it is recognized within Notepad++.
Here's the section of code:
<h2><a>Related Park News</a></h2>
<p id="news">
<div id="link1">
<a href="http://www.stonemountainpark.com/">Stone Mountain Park</a>
<p class="hide" id="link1p" >At Stone Mountain, you can see the world's largest bas-relief, with famous Confederate figures, like Stonewall Jackson!</p>
</div> <br>
<div id="link2">
<a href="https://www.lakecompounce.com/">Lake Compounce</a>
<p class="hide" id="link2p" >Lake Compounce is the oldest currently running amusement park in the US, opened way back in 1846!</p>
</div> <br>
<div id="link3">
<a href="https://www.sixflags.com/newengland">Six Flags New England</a>
<p class="hide" id="link3p" >Six Flag's New England park is commonly known as the "Coaster Capital of New England"!</p>
</div> <br>
</p>
Here's what the w3schools html validator is saying:
Error: No p element in scope but a p end tag seen.
From line 71, column 4; to line 71, column 7
> <br>↩ </p>↩ ↩ ↩
Pic related is a screenshot of Notepad++ recognizing the connected tags.
Thanks for any help!
Can't know without the full code. You're probably missing another p tag on top or something.
Use pastebin.
thats an easy one, you cannot nest <p>s
>>300894
Try this one. If your problem is that you need an id for your line right there, I think you can use a label to tag it. You could also use the "a" tag, and correct any style errors using the css.
replacing the first <p> (#news) with a <div> should clear thing up nicely
>and i should have added this to my post above
Thanks for the help anons, I ended up working it out with an article tag.
I just wish I wasnt stupid enough to forget I can't nest p's.
I appreciate the help!