php-mysql tutorial

Designed By NISHANT GUPTA

  • Home
  • PHP
  • HTML
  • CSS
  • JavaScript
  • JQuery
  • Contact-us
  • Learn HTML

    • Introduction of HTML
    • Image Handling in HTML
    • List Handling in HTML
    • Font Handling in HTML
    • Table Handling in HTML
    • Form Handling in HTML
  • Learn CSS

    • Introduction of CSS
    • Styling Background in CSS
    • Styling Text in CSS
    • Styling Font in CSS
    • Styling Link in CSS
    • Styling List in CSS
    • Styling Table in CSS
    • Styling Div in CSS
    • Styling Span in CSS
    • Positioning in CSS
    • Display in CSS
  • Learn JavaScript

    • Introduction of JavaScript
    • Data Type in JavaScript
    • Variable in JavaScript
    • Oprator in JavaScript
    • Cond. Statement in JavaScript
    • Loop in JavaScript
    • Array in JavaScript
    • Function in JavaScript
    • Date in JavaScript
    • String in JavaScript
    • DOM in JavaScript
    • Event Handling in JavaScript
    • Form Handling in JavaScript
  • Learn PHP-MYSQL

    • Introduction of PHP
    • Decision Control in PHP
    • Loop in PHP
    • Array in PHP
    • Function in PHP
    • Form Handling in PHP
    • File Inclusion in PHP

Font Handling in HTML

Fonts In HTML

The HTML element FONT is an inline element used to change 3 things:

1.font sizes
2.font colors
3.font styles

But it is deprecated in HTML  in favour of cascading style sheets.

The reason for this is simple: CSS  gives us much more flexibility and many more styling options than the FONT element.

General Syntax

Since <font> tag is uded to change only size,color and style , it has 3 attributes : “face”,”size” and “color”.

For Example

<font face=“. . .” size=“ . . .” color=“. . .”>

some text

</font>

Font Face

  1. By default browsers use “Times New Roman” as their default font.
  2. But if needed we can change it to any other font by using “face” attribute of the <font> tag.
  3. As value for the FACE attribute we can use any specific font name such as "verdana", "arial", "georgia", "bookman old style", "comic sans ms" and many more.
  4. Alternatively  may use generic font styles such as "serif", "sans-serif", "cursive", "fantasy" and "monospace".

The above example instructs the browser to display the contained text in arial or helvetica or verdana. If none of them is present then in any “sans-serif” font .

For Example

<html>

<head>

<title> Font face Demo! </title>

</head>

<body>

<font face=“arial,helvetica,verdana,sans-serif”>

<p> This is a demo Paragraph! </p>

</font>

</body>

</html>

Advertisements

 

©  2014 All Rights Reserved  •  Design by >Nishant Gupta.

Privacy Policy • Terms of Use