You are viewing our Forum Archives. To view or take place in current topics click here.
Code for HTML to change font and style?
Posted:

Code for HTML to change font and style?Posted:

Monsterrr
  • Prospect
Status: Offline
Joined: Aug 04, 201014Year Member
Posts: 650
Reputation Power: 32
Status: Offline
Joined: Aug 04, 201014Year Member
Posts: 650
Reputation Power: 32
So I'm making a straight HTML site for a friend and I'm not to sure what the code is to change the font size and font it's self.
Plus I'm not sure what tag to put the code in? The head tag?
#2. Posted:
Zion
  • TTG Addict
Status: Offline
Joined: Jul 03, 201014Year Member
Posts: 2,120
Reputation Power: 95
Status: Offline
Joined: Jul 03, 201014Year Member
Posts: 2,120
Reputation Power: 95
Accomplish this using CSS. Purely HTML will not get you very far. Include this in between your head tags:


<link rel="stylesheet" type="text/css" href="style.css" />


After you include that in your html document, create a file in the same directory named "style.css". Add this code to that file:

body {
 font-size:12px;
 font-family:arial;
}


If you need more help, reply to this post and I'll help you.
#3. Posted:
5FDP_Jekyll
  • 2 Million
Status: Offline
Joined: May 27, 201113Year Member
Posts: 2,048
Reputation Power: 100
Status: Offline
Joined: May 27, 201113Year Member
Posts: 2,048
Reputation Power: 100
well you can use this code as its what i usually use and i think its the best way as the <font> tag is deprecated in html 4 and removed from html 5 i believe

CSS code to change what the whole body says

<style type="text/css">
body
{
font-size: desired font size here;
font-type: desired font type here;
}
</style>

Note: Must be in the Head section

Actually forget about ^^^^^^^ just put it under the html tag
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.