+ 8
How to link JavaScript code inside HTML code (<script></script>) on SoloLearn, when adding code
5 Réponses
+ 4
<script src="javascript_file.js">
+ 11
You can use Css and Js section in Web Code Playground..
+ 5
You can a) write code straight into the JS section of the Code Playground, or b) use the src attribute of the <script> tag, like this:
<!DOCTYPE html>
<html>
<head>
<title>My Code</title>
<script src = “externalJavaScriptFile.js”></script>
</head>
<body>
...
</body>
</html>
Note that, if the src attribute is present, the the content must be empty.
Hope that helps!
+ 4
You don't need to link to the JS and the CSS code in the SL code playground.
+ 4
to link JavaScript code inside HTML code (<script></script>) by this :" please look below " " NOT in sololearn "
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="first sololearn webpage.css">
<!-- script tag can be set inside <head> or <body> tags -->
<title> </title>
<style>
</style>
</head>
<body bgcolor="#789ABC">
<script src="first sololearn webpage.js"></script>
But in sololearn you just compleate typing html,css,and javascript then click run. It will run like magic without linking them inside each other... I hope you understand what i typed ...