Reputation: 327
Silly question but I was wondering if it is possible to add a large spacing inside my div text. For example,
<div>Hello there</div>
Would I have to modify it in css? Is there a way of doing it without css.
Upvotes: 1
Views: 7720
Reputation: 7433
If you want to avoid CSS, you can use
to force an extra space character,  
for two spaces, and  
for four spaces. However, I do not get why you seem uneager to use CSS to achieve this.
You usually use HTML to show the content (and its meaning). In this case, a lot of spaces aren't meaningful to your content. To change the appearance of your content, you should consider using CSS instead. That being said, as requested, here's how you add space without using CSS.
<div>Hello there</div>
<div>Hello  there</div>
<div>Hello  there</div>
Upvotes: 5
Reputation: 46559
I agree with the others that CSS is the way to go here. For example:
div {text-align:justify; text-align-last:justify;}
<div>hello there</div>
Or, with inline CSS rather than external:
<div style="text-align:justify; text-align-last:justify;">hello there</div>
But if it's impossible to use CSS, can you change your html? There are lots of ways of doing this with html. Example:
<table width="100%"><tr><td>hello</td><td align="right">there</td></tr></table>
Upvotes: 1
Reputation: 2321
You can add this
in the html for space or margin-left and you can control the space of changing the number
span{
margin-left: 80px;
}
<div>Hello <span>there</span></div>
Upvotes: 0
Reputation: 731
You can insert a longer space by using any one of the following options:
Two spaces - Type  
Four spaces - Type &emsp
Indent - Type  
Upvotes: 0