Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Inserting image in a web page

sallu110

Coder
Hye! I am trying to insert an image from my pc to a webpage but its not working.I am working on tailwind currently.
<img src="images/PP.jpg"style="width:300px; height:300px" alt = "my pic">
This is what I get:
1619257497513.png
Thanks!
 
Solution
Other then you are missing the ; at the end of -> height:300px everything should work be sure the path to the image is correct ->images/PP.jpg and that it is uploaded or in the proper folder.
Other then you are missing the ; at the end of -> height:300px everything should work be sure the path to the image is correct ->images/PP.jpg and that it is uploaded or in the proper folder.
 
Solution
Other then you are missing the ; at the end of -> height:300px everything should work be sure the path to the image is correct ->images/PP.jpg and that it is uploaded or in the proper folder.
Thanks. I need to ask another thing too. This is the static website which I made using tailwind :
http://127.0.0.1:5500/index.html
I have to use the URL of this website for a sign up process. But they are not accepting it by saying " Please provide full, valid URL". What should I do?
 
Yes, But there are free option out there just search for: "free hosting" -or- "free domain" you will find a option that fits your needs.
I have uploaded it on 000webhost. It has successfully opened the website but the picture is again not displaying. If I simply open the HTML file in web browser then its displaying but with 000webhost its not displaying the picture. https://codifywithsallu.000webhostapp.com/
 
"If" you have uploaded the image, then you have the path wrong. IE: "images/PP.jpg" try uploading the image into the "same" directory as your html file and use this code: [CODE lang="html" title="HTML Pic"]<img src="pp.jpg" style="width:300px; height:300px;" alt = "my pic">[/CODE]

Be sure to rename your pic to "pp.jpg" all lower case, just a note all Linux systems are CaSe sensitive so watch your spelling and folder paths.

"pp.jpg" is not the same as "PP.jpg" they are looked at as two different files.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom