How to add br tag with Jade HTML

拥有回忆 提交于 2019-12-08 18:31:12

问题


I need add br tag but this not working.

table
    tbody
        td Juan Perez
        td 01 33 4455 6677
        td Av José Vasconcelos 804-A Pte. 
            br Col. Los Sabinos,CP. 66220, San Pedro, N.L.

回答1:


Put the text on a new line with a preceding |:

table
  tbody
    tr
      td Juan Perez
      td 01 33 4455 6677
      td Av José Vasconcelos 804-A Pte.
        br
        | Col. Los Sabinos,CP. 66220, San Pedro, N.L.

You could also place both text nodes on new lines to improve readability as well:

table
  tbody
    tr
      td Juan Perez
      td 01 33 4455 6677
      td
        | Av José Vasconcelos 804-A Pte.
        br
        | Col. Los Sabinos,CP. 66220, San Pedro, N.L.

Output:

<table>
  <tbody>
    <tr>
      <td>Juan Perez</td>
      <td>01 33 4455 6677</td>
      <td>Av José Vasconcelos 804-A Pte.<br/>Col. Los Sabinos,CP. 66220, San Pedro, N.L.</td>
    </tr>
  </tbody>
</table>


来源:https://stackoverflow.com/questions/34643483/how-to-add-br-tag-with-jade-html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!