IMO it's way better to keep JavaScript code and CSS styles in separate files to keep structure clean and easy to maintain.