<basefont>
basefont tag
The <basefont>
tag in HTML was originally designed to define a default font size and color for an entire document or specific sections, ensuring consistency in text appearance. However, this element has been deprecated in HTML5 and is no longer recommended for modern web development.
Syntax
<basefont size="value" color="color" face="font-family">
<basefont>
Demo
<basefont size="3" color="blue" face="Arial">
basefont
</basefont>
Key Points
- Purpose: Specifies a default font size and color for text.
- Attributes:
- size: Defines the font size (range: 1 to 7).
- color: Sets the text color.
- face: Specifies the font family (e.g., Arial, Verdana).
- Deprecation: No longer supported in HTML5; CSS should be used instead.
Attributes
Attribute | Value | Description |
---|---|---|
color | color | Sets the default text color (obsolete in HTML5). |
face | font_family | Specifies the font type (obsolete in HTML5). |
size | number | Determines the font size (obsolete in HTML5). |
Conclusion
The <basefont>
tag was once used to control text appearance within an HTML document. However, it has been deprecated in HTML5 and should no longer be used. Instead, CSS provides a more flexible and widely supported method for styling fonts. The attributes size
, color
, and face
are now obsolete, reinforcing the use of CSS for defining font properties in modern web design.
<b>
The HTML <b> element displays text in bold purely for visual styling, without adding any semantic significance or emphasis to the content.
<bdi>
The HTML <bdi> element isolates text for bidirectional formatting, ensuring that its content remains unaffected by the text direction around it, which aids proper display in mixed-direction scenarios.