Can we place inside according to web standards? like this
Demo text
To summarize the other answers, it is W3C valid to use an inside an .
Though to be completly valid you should add an alt attribute to your image, because it's mandatory. This attribute doesn't need to contain text. It's better letting it empty than repeating what is already written in the h1 tag.
In your case if the image is purely decorative it should be:
Demo text 
More info on text alternatives for decorative images: https://www.w3.org/WAI/tutorials/images/decorative/
If the image has a particular meaning or contains a text different than the one in the h1, then use an appropriate alternative.