+91-7906818313 / +91-7500893874 Monday - Sunday 10:00am - 06:00pm
How to Set Space Between two Lines, Characters & Words By CSS

How to Set Space Between two Lines, Characters & Words By CSS

How to Set Space Between two Lines, Characters & Words

Space Between Two Lines:

If you want to give space between two lines then you should read this article. Here you can get information about it with example.

  • It Specifies some space between two lines of a paragraph of text.
  • Line-height: 1.4;

Syntax:

ElementSelector{

line-height:1.4;

}




Space Between Two Letters:

If you want to provide space between two letters then here some points are given below which may helpful for you.

  • It specifies the space between two letters of a text.
  • Letter-spacing: 4px;

Syntax:

ElementSelector{

letter-spacing: 4px;

}

 

Space Between Two Words:

If you want to provide space between two words then you should read these lines which are given below:

It specifies the space between two words of a text.

Word-spacing: 10px;

Syntax:

ElementSelctor{

word-spacing: 10px;

}





Example:

<!DOCTYPE html>

<html>

<head>

<style type="text/css">

p{

line-height: 2.4;

letter-spacing: 2px;

word-spacing: 20px;

}

</style>

</head>

<body>

<p>

This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.

</p>

</body>

</html>





Output:

space

Leave a Reply

Close Menu
Translate »