Computer Science, asked by abhinav1953642, 1 year ago

diffrentiate between href and name attribute of tag

Answers

Answered by ram3365
0

a[name] {

color: blue;

}

a[name="tag"] {

color: red;

}

a[href] {

color: green;

}

<a name="tag">A with name as tag</a><br>

<a name="haha">A with name attribute set</a><br>

<a href="link">one font and color</a>

It will set different CSS styles based on attributes

Similar questions