I'm new to html and I got this piece of code:
@{      ViewBag.Title = "Index"; }  <!DOCTYPE html>  <html>     <head>         <meta name="viewport" content="width=device-width" />         <title>View1</title>         <script src="~/Scripts/jquery-1.9.1.min.js"></script>         <script src="~/Scripts/bootstrap.min.js"></script>         <link href="~/Content/bootstrap-theme.min.css" rel="stylesheet" />         <link href="~/Content/bootstrap.min.css" rel="stylesheet" />     </head>     <body>           <table>                 @foreach (var item in Model.Data)             {                  <tr>                     <td><a [email protected][item.Key]>@item.Key</a></td>                     <td>@item.Value</td>                 </tr>                                     }         </table>     </body> </html>   I want to add a tab or spaces between: <td><a [email protected][item.Key]>@item.Key</a></td> and <td>@item.Value</td> how do I do that?
I guess adding css is the best way but I don't understand how to use it.
It is equivalent to the tab character as such. Thus, from the HTML viewpoint, there is no need to “escape” it using the character reference; but you may do so e.g. if your editing program does not let you enter the character conveniently.
The   character entity used to denote a non-breaking space which is a fixed space. This may be perceived as twice the space of a normal space. It is used to create a space in a line that cannot be broken by word wrap.
Creating extra spaces before or after text One of the most confusing things to new users who're creating a web page is that they cannot press the spacebar multiple times to make additional spaces. To create extra spaces before, after, or in-between your text, use the   (non-breaking space) extended HTML character.
Type   to add a single space. Type   to add 2 spaces. Type   to add 4 spaces.
You can add padding to your td with CSS:
td {    padding-right: 30px;  }  <table>    <tr>      <td><a href="#">Hello</a></td>      <td>Goodbye</td>    </tr>    <tr>      <td><a href="#">Hola</a></td>      <td>Adios</td>    </tr>  </table>  or give them a fixed width:
td {    min-width: 200px;  }  <table>    <tr>      <td><a href="#">Hello</a></td>      <td>Goodbye</td>    </tr>    <tr>      <td><a href="#">Hola</a></td>      <td>Adios</td>    </tr>  </table>  If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With