Taking line breaks out

He has: 1,380 posts

Joined: Feb 2002

How can you take line breaks out of a font tag?

Instead of having:

Hello

How are you
'
because you used a h1 and h2 tag, how can it become:
Hello
How are you
'

I have seen this before, or heard about it...but I couldn't find it on w3.org

Thanks.

Busy's picture

He has: 6,151 posts

Joined: May 2001

do you mean you have
Hello

How are you

but want it to display like so:
Hello
How are you

If so, you can use CSS to set the line height/spacing/margin/spacing of the header (h1, h2, h3, h4 ..) tags, try something like

h1, h2 {margin:0; padding:0; font-size: 1 em; } even throw in the font family if you wish.
Btw if you didnt mean this then just ignore this post Laughing out loud

He has: 1,380 posts

Joined: Feb 2002

I know about all that, but when you do that, you still get a line return.
I mean, the difference between the display of <h1>Hello</h1><br /><h2>Hello Again</h2> and <h1>Hello <br />Hello Again</h1>is minimal, but...in my case, it becomes an issue.

Do you guys follow what I mean?

Busy's picture

He has: 6,151 posts

Joined: May 2001

line height ??

Sorry am not getting what your wanting

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Kyle, Busy is right -- you need to use CSS.

If you want them beside each other, set a class for h2 and set that class to:

display: inline;
'

An example, image, would help if you mean something else. Wink

He has: 1,380 posts

Joined: Feb 2002

Well, lemme try that, and I'll get back here. I've got exams going on, so I don't have alot of time.

But sometime today...thanks.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.