Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > HTML Forum & Tutorial


HTML Fonts


Reply
Views: 1940  
Thread Tools Rate Thread
  #1  
Old 05-03-2009, 02:47 PM
welcomewiki welcomewiki is offline
Member
 
Join Date: Dec 2008
Location: India
Posts: 80,566
Default HTML Fonts

The tag in HTML is deprecated. It is supposed to be removed in a future version of HTML.


Even if a lot of people are using it, you should try to avoid it, and use styles instead.


The HTML Tag

With HTML code like this, you can specify both the size and the type of the browser output :


Example



This is a paragraph.





This is another paragraph.



Font Attributes

Attribute Example Purpose size="number" size="2" Defines the font size size="+number" size="+1" Increases the font size size="-number" size="-1" Decreases the font size face="face-name" face="Times" Defines the font-name color="color-value" color="#eeff00" Defines the font color color="color-name" color="red" Defines the font color
The Tag Should NOT be Used

The tag is deprecated in the latest versions of HTML (HTML 4 and XHTML).
The World Wide Web Consortium (W3C) has removed the tag from its recommendations. In future versions of HTML, style sheets (CSS) will be used to define the layout and display properties of HTML elements.
The Right Way to Do It - With Styles

Set the font of text
This example demonstrates how to set the font of a text.'


Set the font size of text
This example demonstrates how to set the font size of a text.


Set the font color of text
This example demonstrates how to set the color of a text.


Set the font, font size, and font color of text
This example demonstrates how to set the font, font size, and font color of a text.
Where to Learn More About Style Sheets?

First off: Finish the last chapters in our HTML tutorial !!! In the following chapters we will explain why some tags, like , are to be removed from the HTML recommendations, and how to insert a style sheet in an HTML document.

Reply With Quote
  #2  
Old 05-03-2009, 02:48 PM
welcomewiki welcomewiki is offline
Member
 
Join Date: Dec 2008
Location: India
Posts: 80,566
Set the font of text
This example demonstrates how to set the font of a text.




A heading


A paragraph



Reply With Quote
  #3  
Old 05-03-2009, 02:48 PM
welcomewiki welcomewiki is offline
Member
 
Join Date: Dec 2008
Location: India
Posts: 80,566
Set the font size of text
This example demonstrates how to set the font size of a text
.



A heading


A paragraph



Reply With Quote
  #4  
Old 05-03-2009, 02:49 PM
welcomewiki welcomewiki is offline
Member
 
Join Date: Dec 2008
Location: India
Posts: 80,566
Set the font color of text
This example demonstrates how to set the color of a text.




A heading


A paragraph



Reply With Quote
  #5  
Old 05-03-2009, 02:49 PM
welcomewiki welcomewiki is offline
Member
 
Join Date: Dec 2008
Location: India
Posts: 80,566
Set the font, font size, and font color of text
This example demonstrates how to set the font, font size, and font color of a text.





This is a paragraph with some text in it. This is a paragraph with some text in it. This is a paragraph with some text in it. This is a paragraph with some text in it.



Reply With Quote
Reply

New topics in HTML Forum & Tutorial





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)