Monday, June 6, 2011

How to use HMTL to change font permanently?

hey, have u any ideas on how to use a HMTL to change fonts on a permanent basis and not just for single typing,



any codes given will be appreciated alot, thanksHow to use HMTL to change font permanently?
In the %26lt;HEAD%26gt; section of the document insert



%26lt;style type=';text/css';%26gt;

%26lt;!--

body {

font-family: ';Trebuchet MS';, Arial, Helvetica, sans-serif;

}

%26lt;/style%26gt;





Just an example, that will make the font Trebuchet.

There are additional options for fonts which can be inserted inside the body {} section above. Find them at http://w3schools.com/css/css_font.asp





NOTE: The answer above mine is wrong. It must be in the %26lt;head%26gt; section of the document.How to use HMTL to change font permanently?
Fonts and all presentation should be handled by CSS (cascading style sheets) while html is for content.



It's usually better to link to an external style sheet but limited styling can be done in the html document.



If you only want to change a single page add the style to the body tag, eg:



%26lt;body style=';font-family: 楲ucida Console? Monaco, monospace';;%26gt;



Keep in mind that you should stick to standard fonts as most users only have standard fonts installed on their computers. See http://www.webdesigndev.com/web-development/16-gorgeous-web-safe-fonts-to-use-with-css





If you want to change the font for a whole website. Use style sheets so you only have to change it once.



Format on style sheet would look like



body {

font-family: 楲ucida Console? Monaco, monospace;

}
Before your text try these;

-for bold font %26lt;b%26gt;

-for underlined font %26lt;u%26gt;

-to change the font type %26lt;font face=arial%26gt; (make sure you use a common font or it may not work on all computers)

-for large writing %26lt;h1%26gt; or %26lt;h2%26gt; or %26lt;h3%26gt; etc.

-for small writing %26lt;small%26gt;

-for changing colour %26lt;font color=red%26gt; (or look up 'html color chart' and put the number where i've put red)

Hope that's enough for you to do what you want.
You might like to use stylesheets. it is changing the font for whole style you choose.

here is a sample of how to use it but for more information on stylesheets you need to look at following website



%26lt;style%26gt;

.body{font-size:10pt;font-family:arial;}

%26lt;/style%26gt;

%26lt;body%26gt;

This is the text you like to change its font

%26lt;/body%26gt;

No comments:

Post a Comment