非推奨の要素と属性について

HTML 4.01では、いくつかの要素と属性が非推奨とされています。

Strict DTDを宣言している場合は、これらの非推奨要素・非推奨属性、及びフレームは使用することができません。

非推奨の要素と属性の一覧

スタイルシート(CSS)で代替可能なものについては、該当するプロパティを表示しています。

  • 赤いセル(強調されたテキスト)の内容が、非推奨の要素または属性となります。
要素 属性 CSS
<applet>
<basefont> size font-size
<body> bgcolor background-color
background background-image
text color
link a:linkcolor
vlink a:visitedcolor
alink a:activecolor
<br> clear clear
<caption> align text-aligncaption-side
<center> text-align
<dir>
<div> align text-align
<dl> compact
<font> size font-size
color color
face font-family
<h1>-<h6> align text-align
<hr> size height
width width
align text-alignmargin
noshade
<html> version
<iframe> align vertical-alignfloat
<img> align vertical-alignfloat
border border
hspace margin
vspace margin
<input> align vertical-alignfloat
<isindex>
<legend> align
<li> type list-style-type
value
<menu>
<object> align vertical-alignfloat
border border
hspace margin
vspace margin
<ol> type list-style-type
start
compact
<p> align text-align
<pre> width width
<s> text-decoration
<script> language
<strike> text-decoration
<table> align floatmargin
bgcolor background-color
<td> width width
height height
bgcolor background-color
nowrap white-space
<th> width width
height height
bgcolor background-color
nowrap white-space
<tr> bgcolor background-color
<u> text-decoration
<ul> type list-style-type
compact