HTML4 Elements and Attributes Removed in HTML5
Q: Identify and describe the HTML4 elements and attributes that were removed in HTML5. (15 Marks)
HTML5 is a significant upgrade from HTML4. It introduces semantic elements, modern multimedia support,
and encourages the separation of content and presentation. As a result, many presentational and outdated
elements and attributes from HTML4 were removed or deprecated in HTML5. Below are the major changes:
1. HTML4 Elements Removed in HTML5:
<font>: Used to define font size, color, and face. Deprecated in favor of CSS.
<center>: Used to center-align text or elements. Now done using CSS 'text-align'.
<big>, <strike>, <tt>: These were presentational elements. CSS should be used for styling.
<frameset>, <frame>, <noframes>: Used to divide the browser window into frames. Replaced by <iframe>
and CSS layouts.
<applet>: Used to embed Java applets. Now replaced with <object> or <embed>.
<basefont>: Used to set default font style. Deprecated in favor of CSS.
<dir>: Old way to define a list. Use <ul> instead.
<isindex>: Used for single-line input. Now replaced by <input>.
2. HTML4 Attributes Removed in HTML5:
align: Used for alignment in elements like <div>, <img>, <table>. Replaced by CSS.
bgcolor: Used to set background color. Use 'background-color' in CSS.
border: Used in <img>, <table> to set border. Use CSS 'border'.
alink, vlink, link: Used to set link colors in <body>. Replaced by CSS.
height, width: Used in elements like <td>, <th>. Now handled using CSS.
name (in <a>): Replaced by 'id' for internal linking.
type (in <script>, <link>, <style>): No longer required; default values are assumed.
marginwidth, marginheight: Used in <body> and <frame>. Replaced by CSS 'margin'.
clear: Used with <br> for layout. Now replaced with CSS float clearing.
Conclusion:
HTML5 focuses on semantic structure and modern web standards. The removal of outdated HTML4
elements and attributes encourages developers to use CSS for styling and JavaScript for interactivity,
resulting in cleaner and more accessible web applications.