Home > Web Front-end > HTML Tutorial > Which of id and name is the standard usage for marking anchor points? _html/css_WEB-ITnose

Which of id and name is the standard usage for marking anchor points? _html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:16:06
Original
1432 people have browsed it

Not found.


Reply to discussion (solution)

Don’t understand what you mean?

Don’t understand what you mean?

content
content

You add# What does the number mean? When you write an id, you either need to set a style for it separately or to get a value. When you write a name, you usually want to get a value.

What does the # sign mean when you add an id? It sets the style, or it needs to get the value. Writing name is usually to get the value
I made a typo, there is no #. This is not a style.

It’s mainly about what you want to do

I’ve told you how to use it, it’s up to you how to use it, please give me points after finishing the post

It’s mainly about what you want to do Why
go to Baidu “anchor” yourself. What I want is standards.

It is recommended to use id, follow xhtml rules, and is supported in IE, Firefox, Chrome, and Opera. The name attribute has restrictions compared to tags

It is recommended to use id, follow xhtml rules, and is supported in IE, Firefox, Chrome, and Opera. There are restrictions on the name attribute compared to the label

http://stackoverflow.com/questions/484719/html-anchors-with-name-or-id
Found something. It's too long. Let's read it tomorrow.

According to the standard, as the anchor point of positioning, the position is generally unique, so the name should be unique, so using ID is more standardized than NAME. This is HTML5's response to The reason for the cleanup.

If you don’t consider HTML5, there is no need to discuss this issue, because regardless of whether the specification is standardized or not, it is indeed effective and its existence is reasonable.
And if you consider it As for HTML5, there is nothing to discuss, because
is no longer recognized by it.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template