Inline css

hi…m nilesh…
i want ask that…if m using inline css while disigning the website, so is there any problem for website loading or validation or any other problem if i use inline css???

It will make the page weight slightly larger, but it’s also quite inefficient—assuming that there are similar styles on other pages.

but any other problem comes?

Where Ralph said “inefficient” read “easily becomes a nightmare to debug and maintain”.


Not that I can think of—especially if you are only doing this “while disigning the website”. :smile:

You can design the website using stylesheets just as quickly as inline styles. If you need to try out quick changes, use the browser’s built in developer tools.

Can you imagine having to go through all your pages to update styles? Not to mention it’s difficult to maintain. I would seriously question your sanity if you would willingly do inline styling and didn’t mind going through every page and every element when you needed something changed.

Imagine if you want a site redesign! You’d have to completely scrap the HTML since every tag would be associated with CSS. It’d be a complete MESS and I am getting a headache thinking about how poorly that code would be and how bad of an idea it would be. Let’s say for exapmle you have a simple 10 page site. That’s a small site. If you wanted to update the …navigation, for example. Just a simple navigation. THat’s TEN PAGES to go through to update the code just for a simple update! That’s a nightmare. Imagine if you worked for Amazon and you have 500 pages or something. That takes hours.

Now let’s say that CSS would be on an external stylesheet. Boom, takes 10 seconds and the ENTIRE site is updated. There is not even a comparison when it comes to inline CSS vs eternal stylesheet. Please heed my (and everyone elses) advice.

Yes, what I posted previously is based on personal experience learned the hard way.

My first web pages were on AOL Hometown using HotDogExpress and another on Yahoo GeoCities
They were limited in what I could do, but they wre Free and I didn’t know how to do much at the time anyway. this is (also when I first got into Perl because I wanted CGI).

I was learning HTML and mostly going by view-source copy/paste see how it looks at the time.
in hindsight probably not the best way to learn as I eventually had to unlearn a lot.

I got OK and encouraged I added another page, of course I had to have the pages link to each other, so I edited previous pages to have links to the newer pages.
Then I added another, edit re-upload, then a few more, edit all files re-upload.
When I discoverered animated gif horizontal rules I thought “Cool”. Again edit all files re-upload.

By the time I got up to around 20 pages I was finding it a very tedious process to edit files and re-upload all of them every time I wanted to change something.

Don’t misunderstand me, I still use “in head” CSS while working up a page. But even that, better than in-line CSS as it is, is not anything anyone should be doing for anything more than a one-time or experimental thing.

You think that was tedious.

My site had almost 1000 pages by the time I rewrote it to get rid of the layout tables and substitute external CSS.

1 Like