Html Anchor text formatting

隐身守侯 提交于 2019-12-10 19:14:57

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/9120816/html-anchor-text-formatting

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