Sunday, September 23, 2012

How to Put/Create Space in HTML

Hello Everyone,
                         Putting Space in HTML is quite simple, All you need is to put   tag between your text.

So for instance you have a label and a TextBox in your Page, and you need to separate them by giving space between them

    <asp:Label ID="Label1" Text="This is a Label" runat=server/>           // this is my Label


     <asp:TextBox ID=TextBox1 Text="This is a TextBox" runat=server />     //this is my TextBox

Right now If i run this page there will be no gap/space between them so for this I will use &nbsp; tag between these two controls

Like this

     <asp:Label ID="Label1" Text="This is a Label" runat=server/>           // this is my Label
     &nbsp;&nbsp;                                                  //you can use as many &nbsp tag here as you want
     <asp:TextBox ID=TextBox1 Text="This is a TextBox" runat=server />     //this is my TextBox

Now if I run this page there will be space between Label and TextBox, if you want more space than just increase the number of &nbsp tag. thats it

I hope it was informative for you & I would like to Thank you for reading.

No comments:

Post a Comment