Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Keep The TechnoWorldInc.com Community Clean: Read Guidelines Here.
Recent Updates
[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Programming Zone » HTML
  Font and Paragraph Styles
Pages: [1]   Go Down
  Print  
Author Topic: Font and Paragraph Styles  (Read 1005 times)
Daniel Franklin
TWI Hero
**********


Karma: 3
Offline Offline

Posts: 16647


View Profile Email
Font and Paragraph Styles
« Posted: September 26, 2007, 01:40:03 PM »




To change the font style, you would add the font tag inside the

tag. For example:

<font face="Arial">This is a sentence.</font>

To change the color of your text, you would change the word "face" in the above code to "color". It would look like this:

<font color="#008000">This is a sentence.</font>

The number "#008000" is the hexadecimal value of the color green. You could replace "#008000" with the word "green" and the browser would show the same thing. For complicated colors, the browser might not understand what color you want and it might just use a default color like black. To use complicated colors, you have to find their hexadecimal values. Use google and type the keywords "hexadecimal color values" or something similar to it.

To center align your sentences, use the code <p align="center">. For example:

<p align="center">This is a sentence.

To make your sentence left-aligned, juse use

or <p align="left">. To right align, replace the word "left" with the word "right".

You can combine tags to make complex styles. For example the code:

<p align="center"><font color="#008000">This is a sentence</font>
will show "This is a sentence" bold, color green, and centered on the page.

You might wonder that the above code seems long. Can the code be shorter and produce the same effect? The answer is yes. Inside the head tags of your code you have to put a code which tells the browser how to handle user-created tags. Using our previous example, your code in the head tags would look like this:

<head> <style> <!-- .p1 { color: #008000; text-align: center; font-weight: bold; } --> </style> </head>

p1 is the name of your user-created tag. You can rename "p1" to anything that you like. Now, if you want to code the text "This is a sentence" in a shorter way. You would type it as

<p class="p1">This is a sentence
. Articles Source - Free Articles

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.074 seconds with 24 queries.