HTML: Prevent line break between two words
Question by Guest | 2018-02-01 at 19:06
I have a text in which some words belong together and for this reason should not be separated or wrapped by a line break in the next line.
The words should either stay together in the first line or jump together to the next line when there is a line break necessary and not enough space available. Is there any statement or code in HTML for that?
Related Topics
Rewrite Text Files with a fixed Line Length
Tutorial | 0 Comments
How to Replace multiple Texts at the same Time
Tutorial | 0 Comments
Repair Text Files with mixed Line Breaks
Tutorial | 0 Comments
MySQL: Combine full text search with LIKE search for words with 3 letters
Tutorial | 2 Comments
Delphi: Multiline Caption for TLabel (at Run Time and Design Time)
Tutorial | 1 Comment
What is a non breaking space?
Info | 0 Comments
HTML: No line break between particular words
Tip | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You can use the so-called non breaking space for those cases. Just write the character (non-breaking space) between the words that should not be separated:
In this example, "123" and "456" will not be separated and will always stay together.
You can find more HTML ways for preventing line breaks in my article "No line break between specific words" or in the article about preventing line breaks with CSS.
2018-02-01 at 19:50