Can we place `<img>` inside `<h1>` according to web standards?

w3c, web-standards, xhtml, xhtml-1.0-strict

Solution

Yes, you can - the DTD says:

<!ELEMENT h1  %Inline;>
<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
<!ENTITY % special "%special.pre; | object | img ">

That basically means `h1` can contain `%Inline`, which is made of various things, including `img`

Problem

Can we place `<img>` inside `<h1>` according to web standards? like this ``` <h1> Demo text <img src="anyimage.jpg"/> </h1> ```

Original source