Can't change font-size of a tag for given below code
<td valign="top" width="620"><strong><a href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>
Tried:
<td valign="top" width="620"><strong><a style="font-size:14px;" href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>
Nothing changed;
<td valign="top" width="620"><strong><a class="pub" href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>
a.pub
{
font-size: 14px;
}
No changes;
<td class="pub" valign="top" width="620"><strong><a href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>
td.pub
{
font-size: 14px;
}
No effects; It is using font of a tag from style.css file I want to change font-size for only this a tag. Any ideas what I am doing wrong?
To change the font size in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-size. HTML5 do not support the <font> tag, so the CSS style is used to add font size.
To change font size in HTML, use the CSS font-size property. Set it to the value you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a paragraph, heading, button, or span tag.
The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length> units, such as em , ex , and so forth.
Strange it doesn't change, as inline styles
are most specific, if style sheet has !important
declared, it wont over ride, try this and see
<span style="font-size: 11px !important; color: #aaaaaa;">Hello</span>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With