29 AnswersNew Answer
You can copy it to the folder of your code and link it with: <img src="image_name.png"> or link the folder where it is in src Edit: This only works in a Text Editor like VS Code, not in SoloLearn
HYY👋 bro use this method upload ur images to dropbox then it will give you the url of your img then copy paste it then put your url <img src="the url" /> like this hope its useful
<img src ="image.png">
It is possible, but not for playground here. The solution for all is i.e.: https://code.sololearn.com/WSLZPpBIFgr7/?ref=app
JaScript even here also
Jascript what is the aim of ur code
1. Sololearn is server style based app which mean can't access device file manager with this app.. So if you want to import something try to use linked file source, example: you put it in your drive and take the file in the drive link then put it into your source 2. If you want to make it such choose file from your device.. you can't make it in sololearn code tools.. because i already explain it at the first reason.. 3. Use another tools that can access device file manager.. don't use sololearn.. Don't worry, code is code.. never saw where you make it, the code is still have the same function that executable.. What make it don't work if the tools didn't support much or less of your code, if the code have invalid syntax, if you didn't put anything.. That's from me.. Always confident and keep typing! :>
Dropbox is the app to do it all install it on your phone and you are good to go. It helps you get files from your phone and insert them in your code on sololearn. So after installing it click on the plus sign and then click on upload files. Navigate through your phone and get that file. Choose the file you want to insert in your code it can be an img, audio, vodeo . After that wait untill upload and click on that img or what ever file . Click copy link and paste it into sololearn Eg: https://www.dropbox.com/s/4zsk9vjprvzivl4/Alan-Walker-Alone.mp3?dl=0 That is the copied link for an audio from my phone so to make it work in sololearn.Change the "www" to "dl" and delete the "?dl=0" and you are done. In sololearn the above link looks lile this; <audio controls> <source src="https://dl.dropbox.com/s/4zsk9vjprvzivl4/Alan-Walker-Alone.mp3" > </audio>
It says TypeError: Can not read property "style" of null in line 11 of js code does it work if you run it?
Eacy in pc web browser (which?), android app or apple app?
JaScript Android App But it shouldn't matter
Yes, of course otherwise I would not show it anymore.
Thank you, for your exact reference. I changed it. Now the error should not occur by you anymore.
JaScript sry i have to say it, but now there is a TypeError in line 41 says: Can not read property "addEventListener"of none But i don't understand why its an error, bc the button with id up is there so it shouldn't be null. 🤔
Jude Okeleke the code shows how to insert / show an image in sololearn code playground in html.
JaScript your problem has been solved
Frist upload your image on online image hosting website Sacond copy image url form hosting website Thrid <img src="paste url"> copy this 👆 code and paste your project Forth paste image url on under tha img tag src attribute Five practice now
You move it to the folder where your code is then you use the <img src="name.jpg">