Altering amount of spacing between lines?


#1

How do I alter the separation between a headline and the paragraph
text?? For example, in the Resume exercise, I had my name as an

headline and my address, phone number and email address as a

. The programming automatically puts an empty line in between
my name and the rest of the text; I want my address information on the
next line immediately below my name, without any spacing in between.

How does this happen?

Thanks!


#2

Hi @stlpm

What exercise are you referring to? Please put a link of it.


#3

miniapple ...
This is from the "old" HTML & CSS" course, which was just recently replaced. It is the final project.

https://www.codecademy.com/en/courses/web-beginner-en-9x6JW-WnAFv/0/7?curriculum_id=50579fb998b470000202dc8b

Everything came out the way I wanted it except for the spacing between my name and my contact info. It comes out as:

NAME

Contact Info

when I want it to be:

NAME
Contact Info


#4

You need to use the line break element <br>.

There are only a few cases where this is acceptable in HTML5, two of them being poems and … addresses :slight_smile:

<p>Name<br>
Street address<br>
City<br>
</p>

Make sure you look at the HTML5 spec and don't start plastering <br> elements all over your pages :slight_smile:

https://www.w3.org/TR/html5/text-level-semantics.html#the-br-element

Most of the time you should be using the CSS property line-height, so have a play around with that too :slight_smile: