-2

I have spent a lot of time researching this issue and I am not sure I understand why this happens. I have changed the directories for my image, changed what my image is called, where the image is placed etc. I feel like there may be something I am missing. I want to keep the image within the header tag.

<h2><img src="Pictures/Rest.jpg" class="img-thumbnail" width="400" height="400" alt="Restaurant"/></h2>
XGR
  • 1
  • 4
  • The header is one thing, the header tag is another. – statosdotcom May 06 '17 at 02:46
  • 1
    Thank you very much! I am still green when it comes to coding. – XGR May 06 '17 at 02:48
  • 1
    I don't see any problems with this. It seems to work fine: https://www.w3schools.com/code/tryit.asp?filename=FFBG7D0C07P6 When placing an image within a

    tag, you must have alt text and you do. Check your css for the img-thumbnail class and h2 tag

    – Saeed Ludeen May 06 '17 at 02:49
  • Thank you, Saeed. Does the source have to be a website? It always seems to work with a website but not when I have the images on my laptop. I am running Ubuntu 16.04 LTS – XGR May 06 '17 at 02:53
  • Look at [this](http://stackoverflow.com/questions/21728850/how-to-give-src-to-the-img-tag-in-html-from-the-system-drive) SO question to use an image from your had drive. – Jeroen Heier May 06 '17 at 04:51
  • Thank you, Jeroen. I found an answer that suggested I move the images to the same folder as the index.html folder. I am going to try that next! – XGR May 06 '17 at 19:44

1 Answers1

0

yes it possible use it with anchor tag.

more detail check it this link Can we place `<img>` inside `<h1>` according to web standards?

Community
  • 1
  • 1