不,它不是合法的HTML.
该div元素未被描述为DTD(4.01)中的EMPTY元素.
该定义没有EMPTY:
<!ELEMENT DIV - - (%flow;)* -- generic language/style container -->
<!ATTLIST DIV
%attrs; -- %coreattrs, %i18n, %events --
%reserved; -- reserved for possible future use --
>
Run Code Online (Sandbox Code Playgroud)
与以下定义形成对比HR:
<!ELEMENT HR - O EMPTY -- horizontal rule -->
<!ATTLIST HR
%attrs; -- %coreattrs, %i18n, %events --
>
Run Code Online (Sandbox Code Playgroud)