Forum Moderators: not2easy

Message Too Old, No Replies

Correct format for a href & css class

Have seen 2 ways...both correct?

         

ksdfla

7:11 pm on Sep 16, 2004 (gmt 0)

10+ Year Member



Hi,

Hoping someone can clarify this for me.

The shopping cart software we use styles the horizontal menu like this, for example:

<a class="dark" href="categories.php">products</a>

I've always thought it should be like this:

<a href="categories.php" class="dark">products</a>products</a>

I just did a search on Google and have found css samples showing it both ways. Are both versions valid? I'm confused now...

(Also, validating the code through w3c didn't indicate a problem with that first version)

Thanks,
ksd

Span

7:15 pm on Sep 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's an a tag, like <a>Click</a>, class (optional) and href (required) are attributes and the order in which you put them in the tag doesn't really matter.

ksdfla

7:28 pm on Sep 16, 2004 (gmt 0)

10+ Year Member



Thanks for clarifying that for me.

Regards,
ksd