+ 1

What is name attribute of anchor tag?plz explain in detail?

7th Sep 2018, 7:41 PM
Afreen
Afreen - avatar
4 Réponses
+ 2
Hi Afreen Saba, By including an anchor tag within a post or page, you can place links in the body of your page which when clicked allow the reader/user to jump to another location on the page. # equals the name attribute Syntax: (== is equal to) #value == name="value" # == name value == value <li><a href="#linkOne">Link one</a></li> <li><a href="#linkTwo">Link two</a></li> <div><a name="linkOne">Anchor one</a></div> <span><a name="linkTwo">Anchor two</a></span> Name attribute of anchor tag explained👍: https://www.expression-web-tutorials.com/anchor-tags.html Have a look at this source👍: https://stackoverflow.com/questions/484719/should-i-make-html-anchors-with-name-or-id Additional sources: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a
7th Sep 2018, 9:53 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 2
Name attribute in anchor tag is obsoleted in HTML5, use id # instead. More information please check https://www.w3.org/TR/html5-diff/ " The following attributes are allowed but Web developers are discouraged from using them and instead strongly encouraged to use an alternative solution: The border attribute on img. It is required to have the value "0" when present. Web developers can use CSS instead. The language attribute on script. It is required to have the value "JavaScript" (case-insensitive) when present and cannot conflict with the type attribute. Web developers can simply omit it as it has no useful function. The name attribute on a. Web developers can use the id attribute instead. "
8th Sep 2018, 12:35 AM
Calviղ
Calviղ - avatar
+ 2
Hi,Vincent Berger Thank you for explaining. 😄😄
8th Sep 2018, 3:46 AM
Afreen
Afreen - avatar
+ 1
Calvin thanks for giving me the answer
8th Sep 2018, 10:45 AM
Afreen
Afreen - avatar