Mickey Mickey - 3 months ago 12
HTML Question

HTML - Assign Multiple "Styles" to text?

I'm just starting out with HTML and I'm having a trouble assigning multiple styles to a text.
I'd like to create a title with two properties:


  1. Centered

  2. Font: Tahoma



I have tried this one:

<h2 style="text-align:center";"font-family:tahoma">TITLE</h2>


but it doesn't work...

What am I doing wrong?

Answer

Mickey. In HTML the style tag has the following syntax:

style="property1:value1;property2:value2"

so in your case:

<h2 style="text-align:center;font-family:tahoma">TITLE</h2>

Hope this helps.

Comments