This is your ID 021-000-000...">

Html: "-" is the same as space ""?

In html if i create html table with column like this

<table>
    <tr>
        <td>This is your ID</td>
        <td>021-000-00001</td>
        <td>...</td>
    </tr>
</table>

      

space and - will call multiple lines when rendered. So for space the solution is:

<td>This&nbsp;is&nbsp;your&nbsp;ID</td>

      

but for the dash - even I will replace it with -, for example

<td>021&mdash;000&mdash;00001</td>

      

it still appears as multiple lines.

How to solve it?

+2


source to share


2 answers


Try something like

<td style="white-space: nowrap;">021-000-00001</td>

      



which should stop breaking it in hyphens.

+16


source


In HTML, one may use the numeric forms - or -; there is also an HTML entity -

> In HTML, one may use the numeric forms &#8211; or &#x2013;; there is also an HTML entity &ndash;

      



edit: d 'oh missunterstour question: /

0


source







All Articles