How to Change HTML Text Font
HTML, or Hyptertext Markup Language, is a standard web programming language used to display content on web pages. It is a programming language that uses tags to designate or signal a specific action. For example, you can use tags to change attributes related to the font. Even though it is recommended that you use CSS, or Cascading Style Sheets, to change design attributes of a web page, it is still useful to know how to change font elements in HTML. You can change three font attributes using HTML, including font size, typeface, and color.
Open the HTML file that you want to alter in a text editor. Right-click the file and select "Open With." Choose "Notepad" if you are in Windows or "Text Editor" if you are on a Mac.
Locate the text that you want to alter. Text will be located inside of a paragraph tag. For example: "
This is an example of text.." The words "This is an example of text" would appear in the web browser and the
tag simply denotes that you are beginning a new paragraph.
Familiarize yourself with how attributes work. Attributes are elements that can be added to the font tag. The size attribute can have a value of "1 to 7", with 7 being the largest font size. The face attribute can have any typeface. For example "Times New Roman" can be entered as a typeface value. Finally, the color attribute can have an HTML color code, which is a hexadecimal code that represents a color. For example, "#FF0000" represents red. See Resources for a link to these codes.
Insert the "font" tag to alter the font. Again, you can change size, face and color. It is vital that you insert the font tag inside of the first paragraph tag. You can change one, two, or all three of the font attributes. If you want to make the font extremely large, Arial font, and red, your HTML code would like this: "
This is the sample text.". Notice that you must close tags after the text is written using the "/" key followed by the tag name. For example, "."
Save the file by clicking "File" and "Save as." Open the file in your web browser by clicking "File" and then "Open." Select the HTML file from your computer and view the font changes you've made.