我们可以将<img>
里面<h1>
根据Web标准? 像这样
<h1> Demo text <img src="anyimage.jpg"/> </h1>
我们可以将<img>
里面<h1>
根据Web标准? 像这样
<h1> Demo text <img src="anyimage.jpg"/> </h1>
是的,你可以-在DTD说:
<!ELEMENT h1 %Inline;>
<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
<!ENTITY % special "%special.pre; | object | img ">
这基本上意味着h1
可以含有%Inline
,它是由各种因素,包括img
谁在使用它看: http://www.w3.org/
<h1 class="logo"><a tabindex="2" accesskey="1" href="/"><img src="/2008/site/images/logo-w3c-mobile-lg" width="90" height="53" alt="W3C" /></a> <span class="alt-logo">W3C</span></h1>
是的,这是允许的。 但是,不要忘记设置alt
的属性img
!
是的,没有。
您可以将图像的H1元素里面,但不太一样......的ALT属性是强制性的。