HTML basefont tag

<basefont> tag in HTML

The <basefont> tag is used to define font-size, text-color or font family for all the text in the document.

The element must be inside the head element.

In XHTML the <basefont> element must be properly closed (<basefont/>).

However, <basefont> tag is not in use anymore.

After HTML5 we have to use CSS instead of it <basefont> tag.

The following example doen't work properly.


Try Yourself