Question:

How do i change the font and font colour and size etc of a sentence in html codes?

by  |  earlier

0 LIKES UnLike

is it something like this?

{font-family:georgia; font-size:10px; color:488649;} blahblahblah {/font}

lol i need help coz that doesnt work..

pls help asap!!

<3

 Tags:

   Report

3 ANSWERS


  1. You can do it with HTML or CSS...

    HTML:

    &lt;FONT FACE=&quot;Arial&quot; SIZE=&quot;3&quot; COLOR=&quot;#FFCC33&quot;&gt;Text&lt;/FONT&gt;

    CSS Inline:

    &lt;P STYLE=&quot;font-family: arial; font-size: 12pt; font-weight: bold; color: #FFCC33;&quot;&gt;

    Text

    &lt;/P&gt;


  2. &lt;font size=&quot;1&quot;&gt; or &lt;font size=&quot;large&quot;&gt; or &lt;font size=&quot;+1&quot;&gt; or the best way is to use css:  &lt;span style=&quot;font-size: 1.1em&quot;&gt;

    Hope that helps some... I see you&#039;re trying to use the CSS, in which case you need to put that font-size in the correct element (a, td, h1, etc..)

    Or you can create your own style:

    &lt;html&gt;

    &lt;head&gt;

    &lt;style=&quot;text/css&quot;

    #mystyle { font-size: 10px; }

    &lt;/style&gt;

    &lt;/head&gt;

    &lt;body&gt;

    &lt;span class=&quot;mystyle&quot;&gt;10px text!&lt;/span&gt;

    &lt;/body&gt;

    &lt;/html&gt;

    ... etc

    Edit:  I accidentally put a &lt;font&gt; tag where I meant a &lt;span&gt;, which is why the person below doesn&#039;t agree with me.  It was incorrect.  Definitely go with CSS where possible.  Spans and divs are modern style.

  3. &lt;font&gt; tags are being phased out, they are being replaced with &lt;span&gt; and &lt;div&gt;

    &lt;span style=&#039;font-family:georgia; font-size:10px; color:488649;&#039;&gt;Test&lt;/span&gt;

    That will work perfectly, it will only control the elements within the &lt;span&gt; tag.

    Take care,

    Chad

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.