HTML and CSS in one file?

St4nley

Member
Apr 13, 2013
469
76
Hello, i was wondering if putting style and the HTML coding in one file would be possible. I visited a hotels index that had been shut down. Specifically blahhotel.com and i had read page source and i saw that the CSS coding and the HTML coding was in one file. I was wondering, should i get in the habbit of making all oy mf styles and coding one file as well? Or is it a bad habbit.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
Header styling looks awful. It's possible by following 's post but it's not recommended.

Most people use separate files for CSS because if they have, say 4 pages on their website which all consist of the same CSS coding but then you decide you need to add/edit/remove something from the CSS, you will have to do it 4 times to make your website consistent.

It's much better to use a separate CSS file because then you only have to update the CSS once and then it updates on every page it is linked to via <link type="text/css" rel="stylesheet" href="css/global.css" />
 

Users who are viewing this thread

Top