Page 1 of 1

How to create line spaces

Posted: Sat Feb 17, 2007 7:36 pm
by methos
How can I create a line space inside a <h2> ?

I normally use this method but it is incorrect since you cannot have two consecutive "<br />".

Code: Select all

<h1>title</h1>
<h2>The paragraph should not have consecutive line breaks.<br /><br />But I cannot find an answer to this problem.<br /><br />Can you help me?</h2>

This is also incorrect because you cannot have <p> inside <h2>:

Code: Select all

<h1>title</h1>
<h2><p>The paragraph should not have consecutive line breaks.</p><p>But I cannot find an answer to this problem.</p><p>Can you help me?</p></h2>
This is also incorrect right?

Code: Select all

<h1>title</h1>
<h2>The paragraph should not have consecutive line breaks.</h2><h2>But I cannot find an answer to this problem.</h2><h2>Can you help me?</h2>
So how can I insert line spaces without two consecutive <br /> ?

Posted: Sat Feb 17, 2007 9:17 pm
by Kieran Huggins
You're using the h2 incorrectly to begin with - what you probably want is either a DIV or a SPAN that has been styled (class="subtitle" ?)

Re: How to create line spaces

Posted: Sat Feb 17, 2007 9:22 pm
by nickvd
methos wrote:I normally use this method but it is incorrect since you cannot have two consecutive "<br />".
Huh? Where the heck did you hear this? It's not even close to being true...

Posted: Sat Feb 17, 2007 10:02 pm
by RobertGonzalez
Personally, I'd use a DIV tag and style <p> tags inside of it to do what you want to do.