

Here we have used the or paragraph tag, but you could use it within div or span as well. You can use this between any elements and with in any HTML tag. This is a short sentence with extra spaces between text The above example will display or render in the web browser as:

You can use these to add an extra space almost anywhere you like.

To insert multiple spaces, you need to know about the extended HTML character: or the non-breaking space character. spaces between words or characters in text elements This is because of how HTML specification works and how the rendering engines are programmed.
Creating spacing between words in word code#
You look at the source code and see the multiple spaces but somehow the webpage does not have it. This can be really confusing for new users and novice programmers. Depending on the HTML editor you are using, you might be able to do it in the editor as well, but as soon as the page renders in a web browser those spaces disappear. When writing text or sentences in most text processing software, you will be able to hit the space bar multiple times and add multiple spaces wherever you want. When authoring web pages and programming in HTML, you might have noticed that no matter how many spaces you put between words or text elements they get collapsed to a single space when rendering the page.
