+ 2
How to make a hyperlink (<a>) align at the middle?
I write it in HTML and CSS: HTML : <a href="www.sololearn.com" class="target" align="center"> CSS : .target{ color: red; text-align: center; } I try using HTML first but it is align on the left so I use CSS. CSS also have the same result
8 Respostas
+ 5
if u want to use external css then
a {
text-align:center;
display:block;
}
+ 4
This way (use HTML):
<p align="center"><a href="www.Sololearn.com>link</a></p>
+ 1
<a href="http://www.sololearn.com" style="margin:auto">SoloLearn</a>
+ 1
@benka first of all close the anchor tag. secondly, the align attribute of p tag is deprecated in html5.. so use CSS instead..
0
🤔🤔 go through the css inline properties.. if u want to use directly in html file..
0
To @Norbii85. Not working
0
write display:block
0
Thanks