Reputation: 365
I see a interesting thing with title tag html, the title tag can bold. Like this page. Anyone know how to do it?
Upvotes: 1
Views: 13050
Reputation: 1137
Don't do this. As @Quentin said in the first comment, it's bad for A11Y.
Also, not possible to achieve in an accessible way: <title>
can't be styled using CSS.
One solution is to use the unicode chars of bold text. If you inspect the source of those examples that you quoted, you see this:
You can copy this line:
CSS Editor - 𝗢𝗡𝗟𝗜𝗡𝗘 𝗖𝗦𝗦 𝗖𝗢𝗠𝗣𝗢𝗦𝗘𝗥 𝗔𝗡𝗗 𝗖𝗟𝗘𝗔𝗡𝗘𝗥
Here's a list of unicode chars. From U+1D5D4
on you find the ones you want.
Upvotes: 6
Reputation: 1608
You can use the <strong>
tags inside your normal text tags in HTML (<p>, <a>, <span>, etc.
)
Styles cannot be applied to the <title>
tag.
In CSS, you can use the property font-weight: bold;
on any normal text tags as well.
Upvotes: 0