0
When would you use the script and style tags to write js and css code
I know that it is a habit to write them seperetly "sory if I spelled that wrong" but in a small project with know frame works you can do that.
2 Answers
+ 5
It is best practice to keep code separate for faster loading and cleaner, more maintinable code. Except during practice or prototyping which can be helpful for quick iteration, debugging, or small-scale testing.
+ 3
It seems you answered your question yourself. You can embed JavaScript or CSS into an HTML file but it is best practice to create separate files and include or import them by using the script and style tags.