Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I change font size in <CODE>? 1

Status
Not open for further replies.

OfficeAnimal

Technical User
Jun 4, 2009
277
AU
I am using HTML 4.0 and the <CODE> tag. The resultant display appears to be in approx 18pt Courier. How can I get it down to 12pt to match the rest of the document?
 
Hi Vragabond

I didn't declare <CODE> in my style sheet.
<CODE> is listed as a standard tag in my textbook
 
I believe officeAnimal is referring to the CODE tag ( although this tag has the option for a CLASS so it can be styled something like the following :

Code:
<style type="text/css">
.myCode {
  font-size: 1em; /* this is an example size */
}
</style>

....

<code class="myCode">
    This is some text
</code>

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
ggriffit, Vragabond posted correctly and is already aware of what 'code' is in HTML. Vragabond's CSS applies style to all <code>. Your CSS only applies style to <code> with your unique class of myCode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top