Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to insert long space after title using html?

Tags:

html

i'm using html with title tag.

Eg:

<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 long space after "Title Name" using html code. i tried to use &nbsp; but it is too length to put the code. any other alternative to space after title.

like image 847
ELAYARAJA Avatar asked Jan 22 '13 08:01

ELAYARAJA


People also ask

How do you put a space in a title in HTML?

Adding \u200B (zero-width space) in the beginning of the title text seems to show the extra spacing in Chrome too. To utilize this, the file must be UTF8 encoded.

How do you put a space between lines in HTML?

To add a line break to your HTML code, you use the <br> tag. The <br> tag does not have an end tag. You can also add additional lines between paragraphs by using the <br> tags. Each <br> tag you enter creates another blank line.

How do I use &NBSP?

Type &nbsp; where you want to insert an extra space. Add one non-breaking space character for every space you want to add. Unlike pressing the spacebar multiple times in your HTML code, typing &nbsp; more than once creates as many spaces as there are instances of &nbsp; .


4 Answers

If your problem is that you just want to avoid writing long and much of &nbsp; codes. And if you use PHP then i suggest you to do it like this:

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

Otherwise i see no problem in using much &nbsp; like you did.

like image 71
FeRtoll Avatar answered Oct 18 '22 10:10

FeRtoll


I don’t see why length would be an issue, but you can use actual NO-BREAK SPACE U+00A0 characters instead of the entity reference &nbsp;, e.g.

<title>Title Name                                                        </title>
like image 35
Jukka K. Korpela Avatar answered Oct 18 '22 10:10

Jukka K. Korpela


Regarding FeRtoll's answer and since you don't want to use PHP, you could use the JavaScript library which ports some PHP functions to JS.

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

like image 34
sascha Avatar answered Oct 18 '22 11:10

sascha


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

like image 35
Kasikn77 Avatar answered Oct 18 '22 09:10

Kasikn77