João Silva
João Silva

Reputation: 581

HTML replace Font tag

I have read that the Font tag has been deprecated since 2013. What tag should I use instead? For example, how should I replace this:

<Font Face="Arial", size=+1, Color=#FF0000>
   <p>some text here
</Font>

Thank you in advance!

Upvotes: 1

Views: 1458

Answers (2)

Daniel_ZA
Daniel_ZA

Reputation: 574

You could also use a <span> div with a CSS class.

CSS

.font-class{
  font-family:Arial; 
  font-size:2em; 
  color:#ff0000;   
}

HTML

<span class="font-class">
  some text here
</span>

I find this much neater than inline styling

Upvotes: 4

Fabian Scheidt
Fabian Scheidt

Reputation: 392

You should use css to style your content. Like so:

<p style="font-family:Arial; font-size:2em; color:#ff0000;">some text here</p>

Upvotes: 0

Related Questions