Reputation: 1
I'm playing around with Meteor/Blaze/Blaze-Layout, very new to all of the above, and am running into a simple but puzzling-to-me problem. The template below renders everything inside of the <p>
tags but does not render the first <h2>
at all.
<template name="blazeTest">
<h2>
Hello, I am a header.
</h2>
<p>
Hello I am a paragraph.
<h2>
Hello, I am a header inside of a paragraph.
</h2>
</p>
</template>
Am I missing some detail or does anyone have any insight as to why this might be happening? Thank you for any help you can throw my way.
Upvotes: 0
Views: 325
Reputation: 7217
You can't have <h2>
inside of <p>
. That html is semantically incorrect, so you can't contain <p>
in <h2>
or vice versa.
Some additional (a bit cloudy) information here: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories
And specifically about H1: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
Upvotes: 0