Learn Basic HTML Complete Course part 9

1 min read

HTML Anchor

The HTML anchor tag defines a hyperlink that links one page to another page. It can create hyperlink to other web page as well as files, location, or any URL. The "href" attribute is the most important attribute of the HTML a tag. and which links to destination page or URL.

href attribute of HTML anchor tag

The href attribute is used to define the address of the file to be linked. In other words, it points out the destination page.

The syntax of HTML anchor tag is given below.

<a href = "..........."> Link Text </a><br>


If we want to open that link to another page then we can use target attribute of tag. With the help of this link will be open in next page.

output:


The target attribute can only use with href attribute in anchor tag.

If we will not use target attribute then link will open in same page.



Appearance of HTML anchor tag

  • An unvisited link is displayed underlined and blue.
  • visited link displayed underlined and purple.
  • An active link is underlined and red.

You may like these posts

  • Global AttributesHTML global attributes are those attributes which are common for all HTML elements. The global attributes are supported by both standard and non-standard element.T…
  • HTML LayoutsHTML layouts provide a way to arrange web pages in well-mannered, well-structured, and in responsive form or we can say that HTML layout specifies a way in which the we…
  • HTML ImageHTML img tag is used to display image on the web page. HTML img tag is an empty tag that contains attributes only, closing tags are not used in HTML image element.Let's s…
  • HTML Ordered List | HTML Numbered ListHTML Ordered List or Numbered List displays elements in numbered format. The HTML ol tag is used for ordered list. We can use ordered lis…
  • HTML ElementsAn HTML file is made of elements. These elements are responsible for creating web pages and define content in that webpage. An element in HTML usually consist of a sta…
  •  Introduction of HTMLHTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web. 🔹HTML is a text formatting language.URL – Uniform Resource Locat…

Post a Comment