what does nbsp mean This is a topic that many people are looking for. star-trek-voyager.net is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, star-trek-voyager.net would like to introduce to you Non-breaking space in HTML. Following along are instructions in the video below:
” ve got a basic webpage here just as you can see with one line of of text. That is just a little bit longer than the width of the screen width of the bears of other and of course. If i change the size of the browser window. The text wraps over okay.
But you may not always want certain certain parts of your text to wrap over you may want it to keep on the same light and to do that well of course your lines wrap over between words. Where there s a space. So the way you stop a line wrapping over in this way. Wrapping over to another line is to add an unbreaking space.
And this is a code you can add in html..
So here as you can see here s the code excuse. Me. Here s the text in a standard paragraph tag. Let me put word wrap on so.
We can see it all okay standard spaces. So if we replace these spaces with an unbreaking space. You add this type you add this code. It s ampersand nb s.
Semicolon. So that short for nasa code at the shorten code for none at breaking space. Let s copy select. The next space and paste and paste like i m replacing all the spaces in this line with a the non breaking space code.
Okay all this there okay. So that s done let s go back to the browser. Let s refresh. And now you can see it doesn t break it stays in the same line.
But you have to scroll over to see it all seem a phone that useful if you want to keep certain parts of your text..
All together. And i can give you one very quick example. I ve got a page here for one of my sites. And what i have basically i have this in a table.
I just have a table here and of course. This is one column this text here is a second column just a small table. And i ve got the image as you can see and the name of the person underneath and i don t i didn t want this text to wrap over and this is fine because the text is shorter than the width of the image. However further down the page this text is longer than the width of the image.
And it was wrapping over one word under the other and i didn t want that i wanted it all on the same line..
So i simply replaced the space there with an unbreaking space. And it keeps it kept the text all on one line. So that s one very useful. But very simple useful non breaking spaces that i found and you may find it useful from ” .
Thank you for watching all the articles on the topic Non-breaking space in HTML. All shares of star-trek-voyager.net are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.