HTML a tag for website hyperlinks

Clicking the following link brings you (back) to this page.

HTML a tag for website links – Hyperlinks

Below is the text that made the clickable hyperlink into my WordPress “text” tab…

<a href=”https://www.electronzap.com/html-a-tag-for-website-links-hyperlinks”>HTML a tag for website links – Hyperlinks</a>

  • Opening <a> and closing </a> tags lets the browser know to place a hyperlink in that location.
  • href lets the browser know where the hyperlink’s final destination is. It is added inside the opening a tag. An equal symbol follows it, and then the destination URL is entered between quotation marks. The person viewing the link does not see this unless they hover the cursor above it and looks where ever the browser displays it.
  • Between the opening a tag, and the closing a tag, is the text that will be shown to the person viewing the hyperlink. It does not influence what happens when the hyperlink is clicked.

Become a Patron!

Open page in a new browser tab:

The following link lets you stay on the page you are browsing, while opening the page that the link is sending you to in a new browser tab. For the example, the link below will open this tag in a new tab if you are on a computer/laptop…

HTML a tag for website hyperlinks

Was made with the additional HTML…

<a href=”https://electronzap.com/introduction-to-html-hyper-text-markup-language/html-a-tag-for-website-hyperlinks/” target=”_blank” rel=”noopener”>HTML a tag for website hyperlinks</a>

  • target=”_blank” was added inside the a tag to start a new browser tab instead of replacing the current tab with the page assigned to the hyperlink that was clicked.
  • WordPress automatically adds the rel=”noopener” to the opening a tag for me when I have the link open on a new page. That helps prevents an untrustworthy destination site from being able to tamper with the previous page.

Upcoming topics I plan to add to this page:

  • Turn a hyperlink into a clickable button and change the button’s appearance using CSS.
  • Go to top of the current page using #top.
  • Go to bottom of the current page using #bottom.
  • Go to a section of the current page using #section and id.

To support this site, check out the following links:

Home page

  • Information on this site is not guaranteed to be accurate. Always consult the manufacturer info/datasheet of parts you use. Research the proper safety precautions for everything you do.
  • Electronzap is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.