Html Anchor text formatting

2019-07-04 11:42发布

This may be a basic question but I am using HTML anchor, with the text of the anchor as a multi line paragraph. I have <br> tags in the textpart of anchor which are currently not recognized (all text is in one line in output).
Code for anchor tag is as follows:

    <li>
     <a href="" title="View all ">Printed Documents
       <br>Total distinct count: 88
       <br>Top docs are:
       <br>RevA02A rework for N3784.doc
       <br>PO33006230.pdf
     </a>
   </li>

How do I have anchor text to be formatted on multiple lines? Updated: This list is passed to a js-mindmap.js which generates nodes with the content as this anchor text. I think its somewhere that <br/> tags is escaped..I tried setting the style also but still on 1 line.

标签: html anchor
1条回答
2楼-- · 2019-07-04 12:30

a{display:block;}, and your br tags should be XHTML so <br />

查看更多
登录 后发表回答