Anchor Tags and Name Attributes (2024)

Anchor Tag - HTML<a> Tag

HTML uses the <a> (anchor) tag to create a link to another document. An anchor can point to another html page, an image, a text document, or a pdf file among others.

Example of an anchor tag: <a href="url">Text to be displayed as link</a>

The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.

The example defines a link to the home page of this site.

Example: <a href="http://www.expression-web-tutorials.com/">Expression Web Tips, Tutorials, and Templates</a>

The default of the anchor tag is to go to the top of the document it points to.

Name Attribute

The name attribute is used to create a named anchor. When using named anchors you can create links to a specific section on a page, instead of letting your viewer scroll around to find what he/she is looking for. Named anchors are called bookmarks in Expression Web.

NOTE: Not supported in HTML5. Use the globalid attributeinstead. Specifies the name of an anchor

Example of a named anchor tag: <a name="anchor">Text to be displayed as link</a>

The name of the anchor can be any text you care to use. However, it should not have spaces in the name. Use a hyphen or underscore and all lowercase letter. Expression Web uses an underscore as the default.

Example: <a name="css-tutorials">CSS Tutorials</a>

A named anchor is not displayed in any special way.

To link directly to the "css-resources" section of the page on tutorials, add a # sign and the name of the anchor to the end of a URL, like this:

<a href="http://www.genealogy-web-creations.com/tutorials.htm/#css-resources">Cascading Style Sheet Resources</a>

or like this if you are creating a link to a place in the same document

<a href="#css-resources">Cascading Style Sheet Resources</a>

Bookmarks or Named Anchors in Expression Web

Named anchors are called bookmarks in Expression Web.

How to Add or Remove a Bookmark in Expression Web

A hyperlink can go to a particular location on a web page by linking to a bookmark (HTML anchor) at the location. The link can be to a bookmark on the same page or to one on a different page. You can add a new bookmark and manage existing bookmarks in the current web page by using the Bookmark dialog box.

When you bookmark a selection of text, the text displays with a dashed underline in Design view.

Anchor Tags and Name Attributes (1)

<a name="10-bible">10. Family Bible,</a> C. H. Davis, Pasadena, California.

If you insert the bookmark before the text you want without selecting it first, the text is no longer formatted as a link but the bookmark will still function

Anchor Tags and Name Attributes (2)

<a name="10-bible"></a>10. Family Bible, C. H. Davis, Pasadena, California.

Notice the placement of the closing tag within the code. Choose the method you use depending on how you want the bookmarked text to display.

When you bookmark an empty location, the bookmark is indicated in Design view by a bookmark icon when Show and Paragraph Marks are both selected under Formatting Marks on the View menu.

Anchor Tags and Name Attributes (3)

To create a bookmark

Step 1 - Open the web page in either Design view or Code view.

Step 2 - Select the text to which you want to assign a bookmark OR place your cursor in an empty space next to the text you want to use as a bookmark.

Step 3 - Insert | Bookmark or CTRL + G. In EW4 use Ctrl + Shift + G.

Anchor Tags and Name Attributes (4)

Step 4 - In the Bookmark dialog box, under Bookmark name, type a name for the bookmark. If you have selected more than one word, the default for Expression Web is to use the selected text separated with an underscore.

Anchor Tags and Name Attributes (5)

To remove a bookmark

Step 1 - Open the web page in either Design view or Code view.

Step 2 - Insert | Bookmark or CTRL + G NOTE: This only worked when I first highlighted the bookmark > Selected Go To and then

Step 3 - Under Other bookmarks on this page, click the bookmark you want to delete. Click Clear.

Anchor Tags and Name Attributes (6)

Tip - You can also remove a bookmark that's selected in your web page by pointing to the tag that appears in the Quick Tag Selector bar at the top of the web page, and then click the arrow next to the tag and select Remove Tag.

Anchor Tags and Name Attributes (7)

Anchor Tags and Name Attributes (8)

Copyright © 2007 Pat Geary ofGenealogy Web Creations All Rights Reserved
Revised: January 2011

Anchor Tags and Name Attributes (2024)
Top Articles
[Solved] In MS Word 2016, which of the following key combinations is
Can Your School See Your Internet History — The Truth Exposed
Walgreens Harry Edgemoor
Www.politicser.com Pepperboy News
30 Insanely Useful Websites You Probably Don't Know About
Horoscopes and Astrology by Yasmin Boland - Yahoo Lifestyle
Konkurrenz für Kioske: 7-Eleven will Minisupermärkte in Deutschland etablieren
Dr Klabzuba Okc
Richard Sambade Obituary
GAY (and stinky) DOGS [scat] by Entomb
Big Y Digital Coupon App
Weapons Storehouse Nyt Crossword
Bme Flowchart Psu
Raid Guides - Hardstuck
Connect U Of M Dearborn
London Ups Store
Puretalkusa.com/Amac
Itziar Atienza Bikini
Fraction Button On Ti-84 Plus Ce
Ms Rabbit 305
Music Go Round Music Store
Craigslist Houses For Rent In Milan Tennessee
Craigslist Apartments Baltimore
Anotherdeadfairy
683 Job Calls
Valic Eremit
Lacey Costco Gas Price
Firefly Festival Logan Iowa
Phoenixdabarbie
Mini-Mental State Examination (MMSE) – Strokengine
Ilabs Ucsf
Eero Optimize For Conferencing And Gaming
Tendermeetup Login
CARLY Thank You Notes
Boggle BrainBusters: Find 7 States | BOOMER Magazine
Blasphemous Painting Puzzle
Housing Intranet Unt
Hellgirl000
„Wir sind gut positioniert“
Academy Sports New Bern Nc Coupons
Craigslist Freeport Illinois
2017 Ford F550 Rear Axle Nut Torque Spec
Hanco*ck County Ms Busted Newspaper
Tommy Bahama Restaurant Bar & Store The Woodlands Menu
Lyons Hr Prism Login
Craigslist Cars For Sale By Owner Memphis Tn
Competitive Comparison
Jasgotgass2
Noaa Duluth Mn
Latest Posts
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 5509

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.