Reputation:
I have this html:
<div class="a"><font size="40"><font
color="black">A</font></font></div>
The thing is, I can't make the font-size bigger. No matter what I do, it just stays at a certain size. If I increase 40
to 50
, for example, it makes no difference.
I then tried:
.a {font-size: 50px;}
Nothing.
Page ref: https://adsler.co.uk/about-adsler/
Upvotes: 1
Views: 1016
Reputation: 54
As of HTML5, the Font-tag is deprecated. Instead you should style all of your elements with css:
<div class="a"> A </div>
<style>
.a {
font-size: 40px;
color: black;
}
</style>
Upvotes: 1
Reputation: 1200
font tag supports "size" attribute to be a number between 1 to 7 you could use the custom css on font tag with "style" attribute like
<font style="font-size:40px;">A</font>
or you could remove the font tag and apply the style attribute to div tag
<div style="font-size:40px;">A</div>
Upvotes: 0
Reputation: 73
The <font>
tag is no longer supported and does not work in HTML5.
Remove it and set the style in the <style>
tag in the <head>
or in the linked stylesheet:
<style>
.a {
font-size: 40px;
color: black;
}
</style>
Alternatively, set the style directly on the element inline:
<div style="font-size: 40px; color: black">A</div>
Upvotes: 2
Reputation: 482
You should use CSS style for div
tag :-
<div style="font-size:50px; color: black;">A</div>
Upvotes: 1