[thelist] A (simple?) HTML question...

Lawrence Oluyede l.oluyede at gmail.com
Tue Aug 19 07:40:28 CDT 2008

On Tue, Aug 19, 2008 at 2:30 PM, Joost van Velzen <joost at nr6.nl> wrote:
> Hi Kipper,
> Why do you need that class in "<a href="url" class="HL2">heading</a> "
> sure, now you can
> ".HL2 { css stuff }"
> but why not use
> "h2 a { css stuff }"
> I prefer to write the h2 a version, because this saves you adding
> classes to every single a withing an h2.

The first (with a meaningful classname) is better if you have to apply
the same style to entirely different kind of elements.
The second one is clear per-se.

IMO obviously

Lawrence, stacktrace.it - oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair

More information about the thelist mailing list