- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Managing Spacing Between Words with CSS wordspacing Property
By defining the CSS word-spacing property, we can set the amount of white space between the words.
The following examples illustrate CSS word-spacing property.
Example
<!DOCTYPE html> <html> <head> <style> div { margin: 2%; padding: 2%; background-color: mediumorchid; color: ivory; word-spacing: 2.2cm; } div:last-of-type { word-spacing: normal; } </style> </head> <body> <div>I Don't Care! I Love It!</div> <div>I Don't Care! I Love It!</div> </body> </html>
Output
This will produce the following result −
Example
<!DOCTYPE html> <html> <head> <style> article { margin: 2%; padding: 2%; background-color: azure; word-spacing: 2.2cm; } article:last-of-type { word-spacing: normal; } </style> </head> <body> <article>tldr; this article doesn;t mean anything</article> <article>0123456789 is not a phone number</article> </body> </html>
Output
This will produce the following result −
- Related Articles
- Setting Spaces between Letters with CSS letter-spacing Property
- Animate CSS word-spacing property
- Animate CSS border-spacing property
- Usage of CSS border-spacing property
- Usage of word-spacing property in CSS
- Usage of letter-spacing property in CSS
- Perform Animation on CSS letter-spacing property
- HTML DOM Style wordSpacing Property
- Word Spacing Working with CSS
- How to set the spacing between words in a text in JavaScript?
- Word Spacing using CSS
- Letter Spacing in CSS
- Letter Spacing using CSS
- Add or subtract space between the words of a sentence with CSS
- How to increase the spacing between subplots in Matplotlib with subplot2grid?

Advertisements