Asked • 05/02/19

Should I make HTML Anchors with 'name' or 'id'?

When one wants to refer to some part of a webpage with the "`http://example.com/#foo`" method, should one use <h1><a name="foo"/>Foo Title</h1>or <h1 id="foo">Foo Title</h1>They both work, but are they equal, or do they have semantic differences?

1 Expert Answer

By:

Gabriel F. answered • 10/30/19

Tutor
5.0 (85)

Full Stack Software Developer and Mentor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.