Explain use of NAME and HREF attributes of the A tag.

Q5. Explain the use of the NAME and HREF attributes of the <A> tag.
Ans. The NAME attribute defines a name of a section/ segment in a document. For example:
<A name=”segment1”> segment1</A>

The HREF attribute defines the URL of the target segment/ location/ page. For example:
<A HREF=”#segment1”> Link to Segment1</A>
<A HREF=http://www.plant.com> Plants</A>

2 thoughts on “Explain use of NAME and HREF attributes of the A tag.

  • May 6, 2018 at 7:22 pm
    Permalink

    That’s the awesome site aand its very helpful dear …………thnks for giving information about HREF

    Reply
    • May 7, 2018 at 4:23 pm
      Permalink

      Thanks for your support. It really means alot to me.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: