Home > database >  How do I embed an image that has an # symbol in the file name?
How do I embed an image that has an # symbol in the file name?

Time:11-22

Suppose you have an image called example#1.png, how do you embed this image as the source in an image tag?

This is what I've tried, doesn't work:

<!DOCTYPE html>
    <html>
    <head>
        <title>Example</title>
    </head>
    <body>
        <img src="example#1.png"/>
    </body>
</html>

CodePudding user response:

You just need to replace the # with its URL Encoded Equivalent.

So, # becomes #

Look Here for More URL Encodings

  •  Tags:  
  • html
  • Related