what is the purpose of name attribute in <A> tag
Answers
Answered by
5
Name attribute of a tag is used to name a given region. So, when you want to link a part of the webpage using <a href> tag, you put the value of the name attribute along with Hashtag (#) in the value of <a href> attribute. Example
<html>
<head>
<title>Brainly</title>
</head>
<body>
<a name = "top">
<h1>Pls mark me as brainliest</h1>
. <br>
. <br>
. <br>
. <br>
. <br>
<a href = "#top">Go to top</a>
</body>
</html>
Hope it helps :)
Similar questions