diff --git a/content/html/concepts/tags/terms/basefont/basefont.md b/content/html/concepts/tags/terms/basefont/basefont.md new file mode 100644 index 00000000000..402b76df564 --- /dev/null +++ b/content/html/concepts/tags/terms/basefont/basefont.md @@ -0,0 +1,42 @@ +--- +Title: '' +Description: 'Used to be used to set the font of text. This is now deprecated.' +Subjects: + - 'Web Development' + - 'Web Design' +Tags: + - 'Tags' + - 'Style' + - 'Typography' +CatalogContent: + - 'learn-html' + - 'paths/front-end-engineer-career-path' +--- + +The **``** tag was used to set the default font characteristics for the text of an HTML document. Since it is now deprecated, [CSS](https://www.codecademy.com/resources/docs/css) properties like the [`font` property](https://www.codecademy.com/resources/docs/css/typography/font) should be used instead. To set the font of specific parts of the webpage the [`` tag](https://www.codecademy.com/resources/docs/html/tags/font) would be used in combination with the `` tag. + +## Syntax + +The tag must be a child of the [head](https://www.codecademy.com/resources/docs/html/tags/head) tag. Any combination of the following three attributes could be used in the `` tag, with at least one being required: + +- `color`: Sets the [color](https://www.codecademy.com/resources/docs/css/colors) for the font/text using a named color, hexadecimal, or RGB. +- `face`: Sets the font for the text (e.g., `face="verdana"`). +- `size`: Sets the size of the font/text using absolute units ranging from 1-7 (e.g., `size="5"`). + +## Example + +```html + + + + + +

+ This text should be size 5 the font should be verdana and the color should + be green. +

+ + +``` + +![Output of the basefont tag example](https://raw.githubusercontent.com/Codecademy/docs/main/media/basefont-tag-example.png) diff --git a/content/html/concepts/tags/terms/font/font.md b/content/html/concepts/tags/terms/font/font.md index f1f29a83b9c..ba3ca940ad7 100644 --- a/content/html/concepts/tags/terms/font/font.md +++ b/content/html/concepts/tags/terms/font/font.md @@ -21,7 +21,7 @@ At least one of the following three attributes is required for the ``. How - `color`: What [color](https://www.codecademy.com/resources/docs/css/colors) the font/text should be. The color can be set to a named `color`, hexadecimal or RGB. - `face`: What font the text should be. For example, to have the text be `verdana`, the `face` attribute would be set to `face="verdana"`. -- `size`: Sets the size of the font/text. It can use absolute units and relative units ranging from 1-7. Absolute units are used by `size="5"` or any other number 1-7. Relative units are relative the size of the `` tag which is also deprecated. The attribute would look something like this `size="+5"`. +- `size`: Sets the size of the font/text. It can use absolute units and relative units ranging from 1-7. Absolute units are used by `size="5"` or any other number 1-7. Relative units are relative the size of the [``](https://www.codecademy.com/resources/docs/html/tags/basefont) tag which is also deprecated. The attribute would look something like this `size="+5"`. ## Example diff --git a/media/basefont-tag-example.png b/media/basefont-tag-example.png new file mode 100644 index 00000000000..9d699058840 Binary files /dev/null and b/media/basefont-tag-example.png differ