in HTML How to leave space in a line am not asking inbetween lines suppose...

  • Thread starter Thread starter bharath
  • Start date Start date
B

bharath

Guest
...this is the program * * * * * ? without using pre tag v have to do this
* * * * *
* * *
*
in the sec line line of *, space has to come first then following * has to come..same in third line two space has to come then that single *
actually here its displaying as that continuously.. i hope u understand wat am asking...help me in HTML without using pre tag
 
in HTML, multiple spaces in a row are all shortened to a single space. This is to allow you to write HTML with as much white space as you want, without it effecting the outcome of the final look of the page when viewed in a browser.

Imagine this:
<table>
***<tr>
******<td>
*********Some Content
******</td>
***</tr>
</table>

That's a lot of spaces... the HTML tags are not shown of course, but there are 18 spaces that happen before you reach "Some Content"... all of those spaces are removed. There are 9 more spaces AFTER "Some Content", which are shortened to 1.

If you want to force whitespace, you have to use what's called a "non-breaking space" code. You insert it by using the ampersand key (&), followed by "nbsp" (nbsp stands for Non Breaking SPace). It's good form to put a semicolon after it as well.

Like so:
 
you can try

nbsp started with an ampersand (&) ending with semicolon(;) to type spaces

and <br > to new line
 
Back
Top