Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If <a name="..."> is obsolete, what is preferred?

Tags:

html

w3c

obsolete

The HTML code <a name="some_bookmark">text</a> is very useful for creating links to specific sections of a page (e.g., page.html#some_bookmark). However, the W3C spec now marks the name attribute of the a tag as "obsolete."

If this is the case, then what is preferred? Is there a new <bookmark> tag or similar?

like image 325
wchargin Avatar asked Jun 07 '13 00:06

wchargin


People also ask

Which coding elements is obsolete?

datasrc on a , applet , button , div , frame , iframe , img , input , label , legend , marquee , object , option , select , span , table , and textarea elements.

Which HTML5 tags are obsolete?

Some attributes from HTML4 are no longer allowed in HTML5 at all and they have been removed completely. img and iframe. caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr. table, tr, td, th and body.

Is scheme supported in HTML5?

The scheme attribute is supported in HTML but not in HTML5. Rest of attributes like “content”, “http-equiv” and “name” are supported in both HTML as well as HTML5. The scheme element is deprecated from HTML5.


1 Answers

You can place an id="" attribute on any element and it will have the same effect.

These are typically placed on heading elements.

like image 77
SLaks Avatar answered Sep 23 '22 00:09

SLaks