<script>Does CSS and JS both go in script?</script? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

<script>Does CSS and JS both go in script?</script?

I know JS goes in the script section for HTML but does CSS also?

5th May 2018, 10:35 PM
DrChicken24
DrChicken24 - avatar
6 Answers
+ 6
That's weird; maybe you have to start the CSS lesson. I was trying to help with in-app content, but you could also jump down to the "Internal CSS" section here: https://www.w3schools.com/html/html_css.asp
5th May 2018, 11:16 PM
Kirk Schafer
Kirk Schafer - avatar
+ 5
This lesson may help you (swipe to the right): https://www.sololearn.com/learn/CSS/1079/
5th May 2018, 10:43 PM
Kirk Schafer
Kirk Schafer - avatar
+ 3
Wait... It won't let me get on the page...
5th May 2018, 10:46 PM
DrChicken24
DrChicken24 - avatar
+ 3
Ah, ok, thanks! :)
6th May 2018, 12:17 AM
DrChicken24
DrChicken24 - avatar
+ 2
Thank you!
5th May 2018, 10:44 PM
DrChicken24
DrChicken24 - avatar
0
You put CSS inside the <style> tag, and JavaScript inside the <script> tag. E.g.: <style> body { background-color: blue; } <style> <script> alert(“I love JavaScript!”); </script> After doing some testing, I found that the DOM (Document Object Model) does not work is the JS section of a code; you need to put it inside a <script> tag in the HTML.
26th May 2018, 6:17 AM
Rowsej
Rowsej - avatar