Master W3 Schools Anchor Tag A Complete SEO Guide

Logan Jul 13, 2026
Student Gift Tag - Ahoy!
Student Gift Tag - Ahoy!
Free Name Tag Templates
Free Name Tag Templates

The anchor tag syntax is straightforward:

Name Tag Borders - 15 Free PDF Printables | Printablee
Name Tag Borders - 15 Free PDF Printables | Printablee

<a href="url"> Link text </a>

The "href" attribute defines the destination of the link. It can lead to a different web page, a specific section on the current page, or even an email address.

a sign that is on the wall in front of a table with an anchor and other writing
a sign that is on the wall in front of a table with an anchor and other writing

Absolute vs. Relative URLs

Absolute URLs specify a full web address, starting with "http" or "https".

<a href="https://www.example.com">Example</a>

a white and blue sign with an anchor on it that says, all things are peace
a white and blue sign with an anchor on it that says, all things are peace

Relative URLs, on the other hand, reference a location relative to the current page.

<a href="about.html">About</a>

Linking to Email Addresses

Nautical Theme: Tons of Tags
Nautical Theme: Tons of Tags

To create a mailto link, use "mailto:" as the protocol:

<a href="mailto:you@example.com">Send an email</a>

Printable Anchor Shaped Name Tags
Printable Anchor Shaped Name Tags
3rd grade Anchor Charts
3rd grade Anchor Charts
Login
Login
three white and red circular signs sitting on top of a purple table
three white and red circular signs sitting on top of a purple table
Back to School anchor chart Good Student Poster, Good Student Poster For Kids, Good Student Poster Ideas, Good Student Poster Ideas For Kids, What Makes A Good Student Poster, A Good Classmate Anchor Chart, Classroom Expectations Elementary Anchor Chart, Coloring Expectations Anchor Chart, First Day Anchor Charts
Back to School anchor chart Good Student Poster, Good Student Poster For Kids, Good Student Poster Ideas, Good Student Poster Ideas For Kids, What Makes A Good Student Poster, A Good Classmate Anchor Chart, Classroom Expectations Elementary Anchor Chart, Coloring Expectations Anchor Chart, First Day Anchor Charts
9 inch Printable Anchor Template-Beach Theme Cutout-Nautical Template-Beach Wedding Decor-Summer Kids crafts-Classroom Decor-Large Anchors
9 inch Printable Anchor Template-Beach Theme Cutout-Nautical Template-Beach Wedding Decor-Summer Kids crafts-Classroom Decor-Large Anchors
Using Anchor Charts for Back to School
Using Anchor Charts for Back to School
Bulletin board for anchor theme. Anchor your heart in "Believe" All Hands On Deck Theme, Nautical School Door Design, Motivational Nautical Theme, Nautical Classroom Door Ideas, Anchor Themed Classroom Door, Nautical School Theme, Sailor Themed School Decor, Anchor Themed Door Decor, Anchor Themed Banner
Bulletin board for anchor theme. Anchor your heart in "Believe" All Hands On Deck Theme, Nautical School Door Design, Motivational Nautical Theme, Nautical Classroom Door Ideas, Anchor Themed Classroom Door, Nautical School Theme, Sailor Themed School Decor, Anchor Themed Door Decor, Anchor Themed Banner
an anchor with the words keep calm and stay anchored
an anchor with the words keep calm and stay anchored
Anchor Chart Frustration - Hillary's Teaching Adventures
Anchor Chart Frustration - Hillary's Teaching Adventures
an anchor is attached to a lanyard on the floor next to a pair of scissors
an anchor is attached to a lanyard on the floor next to a pair of scissors
a bag of chips ahoy next to a card with an anchor and some cookies on it
a bag of chips ahoy next to a card with an anchor and some cookies on it
Teaching With Miss T
Teaching With Miss T
How a Responsibility Anchor Chart Can Help You Have a Successful School Year - Teaching with Kaylee B
How a Responsibility Anchor Chart Can Help You Have a Successful School Year - Teaching with Kaylee B
Homophones its/ it's Anchor Chart
Homophones its/ it's Anchor Chart
an anchor with words written on it
an anchor with words written on it
Free Name Tag Templates | Page 11
Free Name Tag Templates | Page 11
an anchor is shown in black and white
an anchor is shown in black and white
a white button with an anchor and the word w is on it's side
a white button with an anchor and the word w is on it's side
two name tags with crayons on them for kids to write their name in
two name tags with crayons on them for kids to write their name in

Anchor Tag Target Attribute

The "target" attribute specifies where to open the linked document. The most common values are:

"_blank" - Opens the link in a new browser tab or window.
"_self" - Opens the link in the current window (default).
"_top" - Opens the link in the full body of the window.

Opener Attribute

The "opener" attribute is now obsolete, replaced by "target". It's good practice to avoid using it to maintain compatibility.

Noreferrer and Noopener Attributes

These attributes provide an extra layer of security, preventing the target page from receiving referrer information or knowing the source of the link (noopener).

Creating Bookmarks with Anchor Tag

Anchor tags can also create bookmarks, allowing users to navigate directly to specific sections of the same page. This is done using named anchors:

<a name="bookmark"></a> for the target, and
<a href="#bookmark">Bookmark</a> for the link.

Explore more about theAnchor Tag on W3 Schools, and happy coding!