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, 2022 in HTML by Tejashwini
• 3,770 points
78 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

Best Practice: Access form elements by HTML id or name attribute?

It is a good idea to use ...READ MORE

answered Aug 8, 2022 in HTML by Vikas
309 views
0 votes
0 answers

Difference between id and name attributes in HTML

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

Jun 3, 2022 in HTML by Tejashwini
• 3,770 points
139 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, 2022 in HTML by Tejashwini
• 3,770 points
113 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, 2022 in HTML by Tejashwini
• 3,770 points
490 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, 2022 in HTML by Ashwini
• 5,380 points
135 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,860 points
3,697 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, 2022 in Others by Aditya
• 7,680 points
1,760 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, 2022 in Others by narikkadan
• 63,000 points
485 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, 2022 in HTML by Tejashwini
• 3,770 points
132 views
0 votes
0 answers

Add target="_blank" in CSS

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

Jul 11, 2022 in CSS by Edureka
• 13,140 points
1,037 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP