HTML <basefont> Basefont Tag
Tags: learnhtml
Published: 2021-02-13 09:43:52

---
title: HTML <basefont> Basefont Tag
published: true
date: 2021-02-12 07:52:21 UTC
tags: LearnHTML
canonical_url: https://sharepointanchor.com/learn-html/html-basefont-tag/
---

In HTML, the **<basefont>** Basefont tag **sets a default text-color, font-size, font-family of all the text** in the browser. This tag can be used several times inside the **<head>** or **<body>** tag.

Note: The **<basefont>** tag is a **deprecated HTML tag** , and it is **not supported in HTML 5**.

The main purpose of this <basefont> tag is to **specify the default font size and color of the text**. This base font is applied to complete document.

## Syntax:

The **<basefont>** tag does not contain a close tag in **HTML**. But in **XHTML** it has both **opening <basefont> tag** and **closing <basefont/> tag**.

```

<basefont color="blue" face="Verdana" size="14" >

```

## Sample of the HTML <basefont> Tag:

```

<!DOCTYPE html>
<html>
  <head>
    <title>Title = Basefont Tag</title>
    <basefont color="green" face="Verdana" size="14">
  </head>
  <body>
    <h3>This is the Title of the Document</h3>
    <p>This is the sample paragraph.</p>
  </body>
</html>

```

## Result:

![](https://sharepointanchor.com/wp-content/uploads/2021/02/Result-1-1.png)<figcaption>Result </figcaption>

The **<basefont>** tag is **forbidden** in the updated version of Google Chrome. Because, the **new version of browsers** has its **own pre-built font size and color**. So from the above result, the **<basefont>** tag was **not executable**.

To achieve the former behavior of the **<basefont> tag** , you can use the [CSS](https://sharepointanchor.com/category/learn-css/ "CSS") properties of **font** , **font-size** , **font-family** and **color** properties.

### Sample of the HTML <basefont> tag with CSS Properties:

```

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      body {
        color: #0E9FBC; 
        font-size: 14px;
        font-family: Verdana;
      }
    </style>
  </head>
  <body>
    <h3>Title of the text.</h3>
    <p>Paragraph of the text.</p>
  </body>
</html>

```

### Result:

![](https://sharepointanchor.com/wp-content/uploads/2021/02/Result-10.png)<figcaption>Result</figcaption>

<script async src="//jsfiddle.net/Share_Point_Anchor/be3wuyhg/embed/html,result/"></script>

## Attributes:

The **<basefont>** tag supports the **global attributes** and the **event attributes**. You can use the following properties to style an [HTML](https://sharepointanchor.com/category/learn-html/) basefont tag.

| Attribute | Value | Description |
| --- | --- | --- |
| color | color | This attribute will **set the default text color**. (It is **not supported in HTML 5** ) |
| face | font\_family | It helps to **define the font of the text**. (Now it it **not supported in HTML 5** ) |
| size | number | Helps to specify the **font size**. (It is **not supported in HTML 5** ) |

<figcaption>Attributes</figcaption>
## Browser Support:

![](https://sharepointanchor.com/wp-content/uploads/2021/02/Browser-Support-6.png)<figcaption>Browser Support</figcaption>

### Related Articles:

- **[HTML<address> Address Tag](https://sharepointanchor.com/learn-html/html-address-tag/)**
- **[HTML <aside> Aside Tag](https://sharepointanchor.com/learn-html/html-aside-tag/)**
- **[Basic HTML Definitions and Usages in the Real World](https://sharepointanchor.com/learn-html/basic-html-definitions-and-usages-in-real-world/)**
- **[HTML <abbr> Abbreviation Tag](https://sharepointanchor.com/learn-html/html-abbreviation-tag/)**
- **[HTML <a> Anchor Tag](https://sharepointanchor.com/learn-html/html-anchor-tag/)**

The post [HTML <code><basefont></code> Basefont Tag](https://sharepointanchor.com/learn-html/html-basefont-tag/) appeared first on [Share Point Anchor](https://sharepointanchor.com).