Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

HTML5 depreciated

HTML5 depreciated <a name= in favor of CSS3 id : do i have to

Problem

Привет

HTML5 depreciated ' CSS3 id. Do i have to define every 'anchor id' in a stylesheet?

example of how i'm interpreting what w3c is 'saying'.

Some Text, blah, blah


-or-

The

aragraph Text, blah, blah...


So, do i have to define ' id="SomeName" ' in either head

and repeat this for every 'internal link' , 'name' anchor i want to create? This, like most everything in CSS3 and HTML5 that is supposed to be 'better' seems to be a huge pain in the.... : )

Or,,, do i just 'lie' and label anything i want an 'id' (

) without having to describe the ID in style?

Sorry, but i'm not very good with words, so i hope this is enough to go on.
Thanks in advance, Спасибо,
Landis.

ps, i've found many articles, both here and on the interweb, but none are clear as to whether or not the id needs to be defined in stylesheet or styled in anyway.

Problem courtesy of: Landis Reed

Solution

HTML5 depreciated 'name'

The name attribute for anchor targets was deprecated in XHTML.

in favor of CSS3 id.

No, in favour of HTML's id attribute.

So, do i have to define id="SomeName in either head style or a linked stylesheet?

No, you don't have to style anything you don't want to style.

Or,,, do i just 'lie' and label anything i want an 'id' (

) without having to describe the ID in style?

Not styling something isn't a lie.

The id attribute provides a way to identify an element. That identification can be used by CSS selectors, by JavaScript, by URL fragment identifiers, and a few other things. It doesn't have to be used at all.

Solution courtesy of: Quentin

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

HTML5 depreciated

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×