What is the preferred method for splitting an H tag into two lines? I kind of like the following method, but I don’t really like adding tags just for styling.
[CodePen Example](http://codepen.io/msguerra74/pen/qFtke “”)
You would be better off using the <br> tag.
True, but I was thinking about being able to style the second line separately also.
Then might it not make more sense to do:
<h2>Differently styled sub title</h2>
I thought about that too, but I wanted the h1 to be a single sentence when styles are turned off, or if the document gets printed. I wish there was a way to target the text after the br tag, but I can’t think of a way.
Use a span and set it to display: block.
That’s what I was doing originally, but was trying to accomplish a similar thing without adding the extra span markup. I’m thinking that’s probably the best solution though.
You must be logged in to reply to this topic.