Should I make HTML Anchors with name or id

0 votes

What should one use when using the "http://example.com/#foo" approach to refer to a specific section of a website

<h1><a name="foo"/>Foo Title</h1>

or

<h1 id="foo">Foo Title</h1>

They both function, but are they equivalent or are there semantic differences between them?

Jul 27 in HTML by Tejashwini
• 1,660 points
7 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In HTML

0 votes
1 answer
0 votes
0 answers

Difference between id and name attributes in HTML

The "id" and "name" attributes serve the ...READ MORE

Jun 3 in HTML by Tejashwini
• 1,660 points
27 views
0 votes
0 answers

Transparent box or an image with HTML or CSS

I have no idea about creating a ...READ MORE

Jul 4 in HTML by Tejashwini
• 1,660 points
15 views
0 votes
0 answers

CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page

I have the following page, which contains ...READ MORE

Jul 19 in HTML by Tejashwini
• 1,660 points
22 views
0 votes
0 answers

HTML page on load should open a default phone dial screen with phone number

I have https://www.example.com/phonecall as a URL. When a ...READ MORE

Aug 1 in HTML by Ashwini
• 1,160 points
14 views
+1 vote
1 answer

How can i create simple register form using html and css?

Html5 contains lots of elements using which ...READ MORE

answered Jan 31, 2020 in HTML by Niroj
• 82,740 points
3,074 views
0 votes
1 answer

How to create an HTML button that acts like a link

To answer your doubt, the plain HTML ...READ MORE

answered Feb 17 in Others by Aditya
• 7,300 points
203 views
0 votes
1 answer

HTML5 pushstate and SEO link

self.name= window.location.pathname; window.location.replace("."); Script for pushstate and hashbang fallback: if(self.name){ ...READ MORE

answered Feb 20 in Others by narikkadan
• 11,280 points
70 views
0 votes
0 answers

How do I create an HTML button that acts like a link?

How can I make a button in ...READ MORE

Jul 8 in HTML by Tejashwini
• 1,660 points
17 views
0 votes
0 answers

Add target="_blank" in CSS

On my website, there are external links ...READ MORE

Jul 11 in CSS by Edureka
• 9,940 points
40 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP