Sobes.tech
Middle

Which tags are prohibited in HTML5?

sobes.tech AI

Answer from AI

There are no forbidden tags in HTML5 in the strict sense. Rather, there are tags that are deprecated and not recommended for use, as their functionality is either implemented through other means (e.g., CSS), they pose security risks, or they do not conform to modern standards of accessibility and semantics.

Examples of such tags include:

  • <acronym> - use <abbr>
  • <applet> - use <object> or <embed>
  • <basefont> - use CSS font-size
  • <big> - use CSS font-size
  • <center> - use CSS text-align
  • <dir> - use <ul>
  • <font> - use CSS font-family, font-size, color
  • <frame> - use <iframe>
  • <frameset> - do not use, framesets are deprecated
  • <isindex> - use <input type="text"> and <form>
  • <noframes> - do not use, associated with the deprecated <frameset>
  • <strike> - use <del> or CSS text-decoration: line-through;
  • <tt> - use <code> or CSS font-family
  • <u> - use CSS text-decoration: underline;

Some of these may still be supported by browsers for backward compatibility, but their use is highly discouraged in new code. It is recommended to follow current HTML specifications and use semantically correct and modern tags.