<basefont> element was used to set the default font characteristics for the text of an HTML document. Since it is now deprecated, CSS properties like the
font property should be used instead. To set the font of specific parts of the webpage the
<font> element would be used in combination with the
<basefont> must be a child of the element. Any combination of the following three attributes could be used in the
<font> element, with at least one being required:
color: Sets the color for the font/text using a named color, hexadecimal, or RGB.
face: Sets the font for the text (e.g.,
size: Sets the size of the font/text using absolute units ranging from 1-7 (e.g.,
<html><head><basefont size="5" font="verdana" color="green" /></head><body><p>This text should be size 5 the font should be verdana and the color shouldbe green.</p></body></html>
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
Learn HTML on Codecademy
Front-End EngineerFront-end engineers work closely with designers to make websites beautiful, functional, and fast.
Includes 34 Courses
With Professional Certification