HTML Fonts Flashcards
The <font> tag is deprecated in HTML 4, and removed from HTML5.
The World Wide Web Consortium (W3C) has removed the <font> tag from its recommendations.
In HTML 4, style sheets (CSS) should be used to define the layout and display properties for many HTML elements.
The example below shows how the HTML could look by using the <font> tag:
<p>
<font size=”5” face=”arial” color=”red”>
This paragraph is in Arial, size 5, and in red text color.
</font>
</p>
CSS is used to style HTML elements.
CSS was introduced together with HTML 4, to provide a better way to style HTML elements.
CSS can be added to HTML in the following ways:
- in Cascading Style Sheet files (CSS files)
2. in the <style> element in the HTML head section
3. in the style attribute in single HTML elements
2.It is time consuming,not practical to style HTML elements using style attribute. to add CSS to HTML, put CSS syntax in separate CSS files.