0

How can I combine two or more codes in the SoloLearn Code Playground?

I mean how someone create a game in SoloLearn Code Playground; with html, javascript and css etc. together? How these codes are linked to one another? Please help me.

16th Sep 2018, 6:07 PM
Pranab Ranjan Mandal
Pranab Ranjan Mandal - avatar
6 ответов
+ 2
Normaly you can connect your CSS stylesheet to your HTML document with <link> tag and your external JavaScript file using the <script> tag with src atribute. Here on Sololear these two files are connected automaticaly and you don't need to add those tags to your document. They are in there, you just don't see them.
16th Sep 2018, 8:10 PM
Jan Štěch
Jan Štěch - avatar
+ 1
Jan Štěch can you explain me with an example?
17th Oct 2018, 4:58 AM
Pranab Ranjan Mandal
Pranab Ranjan Mandal - avatar
+ 1
I guess that all programs on the code playground have it's own folder on sololearn server. In this project folder, there are all tje three files, named probably programname.html, programname.css and programname.js. Since they are all in the same folder, you can link them without any additionaldirectory paths (../scripts/programname.js).
17th Oct 2018, 5:33 AM
Jan Štěch
Jan Štěch - avatar
0
You can visit this page: seznamtestu.chytrak.cz . It's just a simple webpage and it's not even in English, but the source code is. Go to the website, go into developer tools (accessable by pressing F12 in chrome) and go to the elements tab. See the head tag. There you will find these connecting tags. (one for CSS, one for JS and one for shortcut icon).
17th Oct 2018, 5:03 AM
Jan Štěch
Jan Štěch - avatar
0
No, I want to say that can you explain a sololearn code as an example... how the sololearn code playground combine these codes?
17th Oct 2018, 5:07 AM
Pranab Ranjan Mandal
Pranab Ranjan Mandal - avatar
- 1
Well, there are probably those tags too. They are just hidden for you.
17th Oct 2018, 5:24 AM
Jan Štěch
Jan Štěch - avatar