Deprecated in HTML5. Do not use.

<basefont> HTML Tag

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Element of
Learn How Fonts And Web Typography Work In HTML: A Beginner's Guide
What does <basefont> HTML Tag do?
The <basefont> element was used to set the default font size for an HTML document. Deprecated in HTML 4.01 and removed entirely from HTML5, <basefont> is not supported by modern browsers and font styling should be controlled with CSS.
Null element
This element must not contain any content, and does not need a closing tag.

The right way to set a “base font”

Use CSS for all typographical styling. Usually, the best approach for setting a document-wide font is to place your font rules in the body.

body {  font-family: Garamond, "Linux Libertine", Georgia, "Times New Roman", serif;  font-size: 16px;  font-weight: normal;  color: #000000; } 

Because of the “cascade”, these rules will be inherited by all the other elements, and you can simply modify them from there. For example, if you want to make your main headlines twice the size as the other text, and your navigation menu slightly smaller than normal text, you can use ems to scale sizes based on the size you declared in your body rules.

h1 {  font-size: 2em;  }  .main-nav {  font-size: .8em; } 

If you approach all your font sizing and styling this way, if you want to change the overall font size (or if the user wants to do so), changes to the body font size will be reflected in the whole document, and all the different sizes will scale up and down appropriately. See our tutorials on CSS and Web Typography for more information.

Adam is a technical writer who specializes in developer documentation and tutorials.