I need to bold the words inside of double quotes.
title="Character needs to be bold"
When i put <b></b>
inside of title's double quote. it just displays them as it is.
So, Is there any way i can bold the characters inside the double quotes?
您是否尝试在标题属性中标记文本?因为那行不通,您将不得不求助于某种扩展的工具提示解决方案(可以是 js,但也有仅使用 html/css 的方法)。
请参阅此问题: Tooltip with HTML content without JavaScript
一些更多的上下文将不胜感激,只是标题属性并没有给我们太多信息
编辑标题以提供上下文,我的答案保持不变。
有一种方法取决于您在下面使用 ' title
' 属性的节点。查看它是否具有“格式”属性,因为默认情况下标题设置为“文本”。如果是这样,请设置format="html"
, 然后您将能够<b>
在您的标题中使用。
据我所知,您无法格式化字符串,该字符串用作 html 文档的标题。那是字符串,它将获得浏览器的选项卡或窗口的标题等。
如果您有一个需要格式化的 html 实体,您可以使用style="your css style"
或其他 css 集成来格式化整个内容。如果您在一个 html 实体中切换格式,您应该在将其划分为多个实体或使用另一种方法之后进行处理。你有完整的例子吗?
干杯,nx
使用<b>字符需要加粗</b>
b 和符号之间没有空格