# Where to start, HTML or CSS?

**URL:** <https://boards.straightdope.com/t/where-to-start-html-or-css/306297>\
**Category:** In My Humble Opinion\
**Created:** [June 1, 2005, 12:52am UTC](https://boards.straightdope.com/t/where-to-start-html-or-css/306297 "2005-06-01T00:52:35Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Sam\_Stone](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@Sam\_Stone](https://boards.straightdope.com/u/Sam_Stone)\
**Post date:** [June 4, 2005, 4:14am UTC](https://boards.straightdope.com/t/where-to-start-html-or-css/306297/21 "2005-06-04T04:14:22Z")

</div>

> [@Caught@Work](#):
>
> Actually, no. My problem with CSS comes from the following in your suggestion.
> 
> Lets say I want to change color3 on ONE page but not on others. I now have to edit the HTML to use color4 (or color2 or color1).
> 
> So CSS will ensure that I can globally change color3 to any other actual color, but if I want to change the look on one element on one page I need to edit the HTML to assign a different ‘color’.
> 
> True that’s the fault of the designer or the customer not knowing what they want to do before creating the HTML, but I’m not sure I know anyone who knows exactly what every element is going to do before they start coding anything.
> 
> I suppose what I’m trying to say is that CSS is good, but don’t fall into thinking that once you create your HTML you will never need to touch it again and that CSS will solve all of your problems. There are still design requirements that will arise that will require you to edit the HTML.

You still don’t edit the html. You have these options: 1) Add new class for just that page, 2) great a different external stylesheet and link it after the global one, overriding its styles for the ones you want, 3) overriding the global stylesheet for those classes with inline styles in the header block of the page, so the content doesn’t have to be changed in any way.

Oh, there’s one more way - you could have a javascript function dynamically change classes based on page numbers using the DOM. Many ways to solve the problem.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [June 4, 2005, 11:56pm UTC](https://boards.straightdope.com/t/where-to-start-html-or-css/306297/22 "2005-06-04T23:56:52Z")

</div>

> [@Caught@Work](#):
>
> Actually, no. My problem with CSS comes from the following in your suggestion.
> 
> Lets say I want to change color3 on ONE page but not on others. I now have to edit the HTML to use color4 (or color2 or color1).
> 
> So CSS will ensure that I can globally change color3 to any other actual color, but if I want to change the look on one element on one page I need to edit the HTML to assign a different ‘color’.
> 
> True that’s the fault of the designer or the customer not knowing what they want to do before creating the HTML, but I’m not sure I know anyone who knows exactly what every element is going to do before they start coding anything.
> 
> I suppose what I’m trying to say is that CSS is good, but don’t fall into thinking that once you create your HTML you will never need to touch it again and that CSS will solve all of your problems. There are still design requirements that will arise that will require you to edit the HTML.

Well, all you have to do is treat that element as an exception to your formatting and override the standard style sheet with an inline style.

You can’t really blame this on CSS. Consistent formatting across all your pages is one of its main benefits, and now you are deliberately breaking that consistency. This is like having to **bold** or _italicize_ certain words in a sentence but not others – there’s nothing any language can do about that, because in the end that particular element (or word) is simply different from all the others and you have to mark it as such one way or another.

---

<div class="post-metadata">

**Author:** ![rjung](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rjung](https://boards.straightdope.com/u/rjung)\
**Post date:** [June 5, 2005, 8:05am UTC](https://boards.straightdope.com/t/where-to-start-html-or-css/306297/23 "2005-06-05T08:05:16Z")

</div>

> [@Caught@Work](#):
>
> True that’s the fault of the designer or the customer not knowing what they want to do before creating the HTML, but I’m not sure I know anyone who knows exactly what every element is going to do before they start coding anything.

That’s the designer’s job, IMO.

I peg my design elements six ways to Sunday before I release my style sheets into the public.

[Previous page](https://boards.straightdope.com/t/where-to-start-html-or-css/306297.md?page=1)
