say I have a piece of text like this
Hello I am some text Hello I am some text Hello I am some text Hello I am some text I do not wish to
bootstrap 4 has a class="text-nowrap"
more here https://getbootstrap.com/docs/4.0/utilities/text/#text-wrapping-and-overflow
Use the white-space property:
Hello I am some text Hello I am some text Hello I am some text
Hello I am some text <span class="nobr">I do not wish to be
broken on new lines</span>
with:
span.nobr { white-space: nowrap; }
Adding this for completeness:
If you do not want to use CSS, you could use <nobr>text with space</nobr>
- reference here
For pure text blocks, i believe not-anymore-depricated html formatting tags like <i>
, <b>
, <nobr>
and alike are valid for use.
For content relating to the site structure use <em>
, <strong>
and <span class="">
.