Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] A weird line-height Reply To: [Solved] A weird line-height

#187084
__
Participant

Here if I’m going to remove all br that i used to end the line and go to the next line, but what i need to put instead ?

<br> still has its place, but it is actually very uncommon that you’d actually need to use it. What Paulie_D is getting at is that, in most places, you’re only using it to make extra space between lines: this is what margins and padding are for.

When writing, the other main use for “going to the next line” is to start a new paragraph: but that’s not really a line break, it’s …a new paragraph. In html, that’s what the <p> tag is for.

The same thing with <u> and <b>, what i need to put instead because you are right, it a pain in the butt to put them on each word

In this specific case, you seem to be using <u> and <b> to style list item headings. You should use heading tags (<h3>, in this case, would be the most appropriate). You can make them bold and underlined via CSS, as Paulie_D said.

I can give up the blockquotes …

Is the list that you have inside the blockquote actually a quote? If it is, then the <blockquote> tags are correct, and you should keep them. If not, then you can simply remove them. Any styling can be applied to the list itself.

when you says p tags what did you meant by that ?

<p> tags create paragraphs (see above).

You should also be aware that paragraphs have some unusual rules in HTML: the closing tag is not strictly required, so sometimes a paragraph might end earlier than you expect.

For example, in your code above, it looks like almost everything is inside a single paragraph (from the opening <p> tag below the h2, all the way to the closing </p> tag just before the closing </div> tag). In fact, however, elements like blockquote and ul are not allowed inside of paragraphs, and so the paragraph automatically ends when the blockquote starts.