0

How to change the line spacing in HTML (WordPress)

Line spacing in HTML1. INTRODUCTION

In this entry I will show you the code it worked for me to change the line spacing in HTML (in WordPress).

Try it out and let me know if it worked for you too.

🤓

 

2. HOW TO MODIFY THE LINE SPACING IN HTML

Try this paragraph attribute to enlarge or reduce the line spacing:

<p style style=”line-height: 100%”>Text you want to line-space<p>

 

3. EXAMPLES

3.1. Example of line spacing 100 %

Code:

<p style style=”line-height: 100%”>Line 1

Line 2

Line 3<p>

Result:

Line 1
Line 2
Line 3

 

3.2. Example of line spacing 200 %

Code:

<p style style=”line-height: 200%”>Line 1

Line 2

Line 3<p>

Result:

Line 1
Line 2
Line 3

 

3.3. Example of line spacing 300 %

Code:

<p style style=”line-height: 300%”>Line 1

Line 2

Line 3<p>

Result:

Línea 1
Línea 2
Línea 3

 

4. DID IT WORK?

As you saw, it works for me.

Normally this is done in CSS, but WordPress themes include a css style sheet that let us modify some attributes directly in HTML (and this is one of the cases).

How I said above, test it out and share your experience. I hope it works for everyone. 💪

 

RELATED POSTS:

 

Javier

PhD in Education. From Spain. Living everywhere. Passionate about learning and sharing. Welcome to Learner Trip!

Leave a Reply

Your email address will not be published.