How to Remove an HTML Anchor Attribute
When you use HyperText Markup Language (HTML) anchors to create hyperlinks (links), you have the option to remove any existing attributes in the element. These attributes specify the properties of the tag, such as the name of the anchor, to help create the kind of hyperlink you display on your site. If you find that these current attributes no longer serve your purpose, modify the HTML code to remove the anchor attribute of your choice.
Instructions
-
-
1
Launch your computer's text editor software and bring up the HTML page that has the anchor attribute you are removing.
-
2
Locate the anchor you want to modify by searching for the desired name or URL address of your link between "<a> and </a>" anchor tags. A typical hyperlink looks like the following example:
<a href="http://www.website.com">Name of Site</a>
-
-
3
Determine the attribute you want to delete by looking at the code between the angle brackets. Common link attributes include "href," which specifies the hyperlink address that a visitor goes to when she clicks the link, and "target," which determines whether to open the linked document in a new window, frame or other browser location. Click and drag your mouse over the attribute name and value to highlight it, then press the "Delete" button on your keyboard to remove it. For example, change "<a href="http://www.site.com" target="_blank">" to "<a href="http://www.site.com">" to remove the target attribute.
-
4
Save your file. Your preferred anchor attribute is now deleted from the HTML code.
-
1
Tips & Warnings
If you get rid of the "href" attribute (Step 3), be sure to replace it with another hyperlink address to keep the code active. For instance, change "href="http://www.siteA.com" to "href="http://www.siteB.com" in the code.