Thursday, January 23, 2025
HomeProgrammingHow to Put Spaces Between Text in HTML? - CSS

How to Put Spaces Between Text in HTML? – CSS

To add spaces between text in HTML using CSS, you can use several properties:

  1. letter-spacing: Adds space between characters.
css
p {
letter-spacing: 2px;
}
  1. word-spacing: Adds space between words.
css
p {
word-spacing: 5px;
}
  1. margin or padding: Adds space around elements or inside elements.
css
p {
margin-right: 10px; /* space after the paragraph */
}
  1. text-indent: Indents the first line of a paragraph.
css
p {
text-indent: 20px;
}

These CSS properties help control spacing between text and elements in an HTML document.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x