Sobes.tech
Middle

What tags are prohibited in HTML5?

sobes.tech AI

Answer from AI

There are no forbidden tags in HTML5 in an absolute sense. However, there are tags that are considered deprecated or not recommended for use, as their functionality has either become outdated or has been replaced by more modern approaches (for example, using CSS).

Main categories of such tags:

  1. Formatting tags without semantic meaning: Their use is strongly discouraged, as styling should be done using CSS. Examples:

    • <basefont>
    • <big>
    • <center>
    • <font>
    • <strike>
    • <tt>
  2. Frame management tags: Deprecated in favor of <iframe>. Examples:

    • <frame>
    • <frameset>
    • <noframes>
  3. Other deprecated/not recommended tags: Tags that either duplicated the functionality of others or had a specific use that has become outdated. Examples:

    • <acronym> (replaced by <abbr>)
    • <applet> (replaced by <object>)
    • <dir> (replaced by <ul>)
    • <isindex> (functionality implemented with other forms)
    • <listing> (used for displaying code listings, replaced by <pre>)
    • <xmp> (analogous to <listing>)
    • <plaintext> (ignored by browsers)

Using these tags will not cause fatal errors, but may result in incorrect display in modern browsers, accessibility issues, and complicate code maintenance. It is important to use current semantic HTML5 tags and apply CSS for styling.