How to insert long space after title using html?

I am using html with a title tag.

For instance:

<html>
  <head>
    <title> Title Name  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;                                                                      </title>
  </head>
</html>

in this I want a long space after the "Title of the name" using html code. I tried to use &nbsp;, but too long to enter the code. any other alternative to space after the name.

+5
source share
5 answers

Using:

<html>
  <head>
    <title> Title Name  <pre>                                          </pre></title>
  </head>
</html>

tags allow you to consider the space as your content, useful for forms, etc.

+3
source

If the problem is that you simply do not want to write a long and a lot of &nbsp;. And if you use PHP, I suggest you do it like this:

<title>Start <?php str_repeat("&nbsp;", 30); ?> End</title>

&nbsp;, .

+1

I don’t understand why length will be a problem, but you can use the actual characters NO-BREAK SPACE U + 00A0 instead of referencing an object &nbsp;, for example.

<title>Title Name                                                        </title>
+1
source

Regarding FeRtoll's answer, and since you don't want to use PHP, you can use a JavaScript library that passes some PHP functions to JS.

http://phpjs.org/functions/str_repeat/

+1
source

How about &nbsp;, &thinsp;, &ensp;and &emsp;?

+1
source

All Articles