+ 1
can i write both of css and javascrip codes in the HTML file.. or i must write each one in i separated file?
4 Antworten
+ 3
CSS and Javascript can be written in a single HTML file. Absolutely works fine. Nevertheless both of them use different tags:
CSS - <style></style>
Javascript - <script></script>.
However, if your code for CSS and Javascript is huge, it is always a good practice to keep the code neat. Separate files would be recommended then.
+ 2
You can put it in the same File. But separating the Stylesheets and Script Files is very recommended. The Website is loading faster if Css and JavaScript Files are separated. For very small programs it makes not very much difference, but in large projects.
+ 1
yes, you can write both codes in same file.
0
thank u all