Hm, something weird going on there. If you just grab your raw HTML, the break displays fine, but something is overriding it, though can’t see what. Might be some JavaScript pulling it out. :sick:
but something is overriding it, though can’t see what. Might be some JavaScript pulling it out. :sick:
Yes it is javascript pulling the <br> out and it is also placing a span in there.
When I disable js the heading breaks as it is intended to and I am able to see the <br> in firebug.
First off, I would use em width. Then I would use <span>.
<br> is for when author CSS is not possible. If author CSS is possbile, there is no reason to use <br>. In this case, if author CSS is not applied, it makes little sense to use a multiple lines h2.
Avoiding the use of presentational HTML elements is always better, but sometimes makes things easier (like in this case). Now it’s the author of the topic that has to choose
PS: I don’t want to be mistaken, I would use only CSS
On a purely semantic point, the second half of the tag seems like it shouldn’t be in the header at all. I’d actually say it’s worth of being in a <h2> tag alone, with the <h1> around the question part:
<h1>What types of results might you expect?</h1>
<h2>You will learn how to:</h2>
Replacing valid code with invalid and incorrect code is likely to introduce more problems, and unlikely to help you identify what the original problem was at all!