# HTML/CSS: How to let the user select a style sheet?

**URL:** https://boards.straightdope.com/t/html-css-how-to-let-the-user-select-a-style-sheet/139629
**Category:** Factual Questions
**Created:** [November 30, 2002, 2:05pm UTC](https://boards.straightdope.com/t/html-css-how-to-let-the-user-select-a-style-sheet/139629 "2002-11-30T14:05:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)
#### Post date: [November 30, 2002, 2:05pm UTC](https://boards.straightdope.com/t/html-css-how-to-let-the-user-select-a-style-sheet/139629/1 "2002-11-30T14:05:01Z")

</div>

I’ve seen a few webpages with a form that allows users to select which style sheet they want to view the page with. I think this a great idea, and I want to implement it on my webpage, but how to go about it? Many of the sites I’ve seen use server-side scripting, which I’d like to avoid, since I don’t even know what’s available to me, as I’m using my University web space. I imagine then that I’ll have to use JavaScript and cookies. But I’ve never used cookies before; there are probably some major things wrong with them.

I’m trying to stay within the HTML 4.01 Strict DTD, but I can upgrade to XHTML 1.0 if I need to. I want it look okay (use a certain default style sheet) if JavaScript is disabled as well.

So what’s the best way for me to do this?

---

<div class="post-metadata">

### Author: ![mazzer](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@mazzer](https://boards.straightdope.com/u/mazzer)
#### Post date: [November 30, 2002, 4:05pm UTC](https://boards.straightdope.com/t/html-css-how-to-let-the-user-select-a-style-sheet/139629/2 "2002-11-30T16:05:14Z")

</div>

> **[A List Apart](https://alistapart.com/)**
>
> For people who make websites

---

<div class="post-metadata">

### Author: ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)
#### Post date: [November 30, 2002, 4:42pm UTC](https://boards.straightdope.com/t/html-css-how-to-let-the-user-select-a-style-sheet/139629/3 "2002-11-30T16:42:42Z")

</div>

So, I take it that’s a vote for JavaScript and cookies, **chriszarate**? I guess I’m asking, is there anything I need to know about cookies before I barrel in and use them for this somewhat trivial trick?

Thanks for the link, BTW. That’s the best explanation of this method that I’ve found.
