문제

I've following text in my webpage:

<a href="http://www.google.co.in">Search Engine</a>

I want this hyper text tobe in bold. At the same time this hyperlink should work. How to use <b> tag with <a> tag? Also I don't want to use CSS for making the text bold. I want to use only <b> tag for making the hyperlink text bold.

도움이 되었습니까?

해결책

Is that what you want ?

Your link is inside a body tag so what's wrong with b tag ? :-)

<b><a href="http://www.google.co.in">Search Engine</a></b>

Also

<a href="http://www.google.co.in"><b>Search Engine</b></a>

Question : But wouldnt it display : <b>Search Engine</b> instead of Search Engine ?

Answer: No. it won't , it would have been if you html encoded the < and >.

(you could have tried it yourself ;-))

다른 팁

this should do just fine

<b><a href="http://www.google.co.in">Search Engine</a></b>

DemoFiddle

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top