+ 3

What method do you prefer when doing web development

So I've been doing some projects and it got me wondering how other web developers arrange their code. Do you use inline method, internal method, or external method (writing your css or js then linking it to you html) when coding with css and js

2nd Mar 2024, 9:35 PM
Afolabi Oluwatobi
Afolabi Oluwatobi - avatar
4 ответов
+ 6
External CSS is used for a more organized and scalable approach to styling, allowing for reusability and maintainability and is preferred. Inline CSS is used for quick and specific styling, internal CSS is used for multiple elements within the same HTML document.
2nd Mar 2024, 10:01 PM
JaScript
JaScript - avatar
+ 5
There are web sites which remain static after their initial creation, and never change. However I think this is the rare exception. In truth, you might want to add another page later, change the color or the background image of something, or even completely redesign the site. In those cases, it is not trivial how much time and effort you must spend with the changes. - in case of inline CSS you have to modify each individual HTML element - in case of internal CSS you have to do the same change in every HTML file - in case of external CSS, you only have to change the stylesheet in one spot, and all your pages will be updated. This is meant by "scalable". For JS this is even more crucial, if you are using external libraries, it is always a requirement to keep them updated, for example to avoid security gaps.
3rd Mar 2024, 7:05 AM
Tibor Santa
Tibor Santa - avatar
+ 3
I personally use internal method
2nd Mar 2024, 9:36 PM
Afolabi Oluwatobi
Afolabi Oluwatobi - avatar
+ 2
External. To me, it looks cleaner and is easier to manage.
5th Mar 2024, 5:39 AM
Daniel Wray
Daniel Wray - avatar