Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Font family (HTML)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Examples == The following example defines the same font face ([[Times (typeface)|Times]] or a default [[serif]], 14 points, italics) in three ways: * With [[CSS]] in a separate stylesheet. * With inline [[CSS]] applied to an element via the {{code|style}} attribute. * With the [[Deprecation|deprecated]] presentational element {{tag|font}} and its non-standard attribute {{code|face}}. ({{tag|i}} is not deprecated in general, but its presentational use is.) <syntaxhighlight lang="css">.text { font-family: times, serif; font-size:14pt; font-style:italic; }</syntaxhighlight> <syntaxhighlight lang="html"> <p class="text"> Sample text formatted with CSS in a separate stylesheet. </p> <p style="font-family: times, serif; font-size:14pt; font-style:italic"> Sample text formatted with inline CSS. </p> <p><i><font face="times, serif" size="3"> Sample text formatted with the deprecated FONT tag. </font></i></p> </syntaxhighlight> It is a [[best practice]] to put a space after the comma, and to put any name containing spaces between quotation marks.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)