What Is Correct Tag To Use To Change Fonts?
#1
Posted 07 December 2012 - 01:43 PM
#2
Posted 07 December 2012 - 02:39 PM
<font color="blah">word</font>
#3
Posted 07 December 2012 - 03:20 PM
<font color="blah">word</font>
No, <font> has been deprecated for a while, and is no longer valid in html5.
@limitphp You should use CSS to apply the font you need to the element containing your text. The element you use should be sematic for whatever the text represents/means on the page. If you need a generic element to wrap a small bit of text, use <span> or <div> depending on if you need inline or block level elements.
Edited by kicken, 07 December 2012 - 03:23 PM.
Did I help you out? Feeling generous? I accept tips via Paypal or Bitcoin @ 14mDxaob8Jgdg52scDbvf3uaeR61tB2yC7
#4
Posted 07 December 2012 - 03:20 PM
<font color="blah">word</font>
I thought html 5 has gotten rid of the font tag. I understand it still works in browsers, but is that really the appropriate tag to use? Is there a tag that would be more in line with the new standards?
#5
Posted 07 December 2012 - 03:21 PM
No, <font> has been deprecated for a while, and is no longer valid in html5.
@limitphp You should use CSS to apply the font you need to the element containing your text. The element you use should be sematic for whatever the text represents/means on the page. If you need a generic element to wrap a small bit of text, use <span> or <div> depending on if you need inline or block level elements.
Div would knock the text after it down on the next line, unless I added some style properties to the div. So, perhaps span is the best tag to use to change the font of one word in a section of text?
#6
Posted 07 December 2012 - 06:18 PM
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












