Href
The href attribute of an HTML anchor specifies the destination resource, URL, or fragment of a hyperlink.
WordPress Power Toolkit: Harness AI to build next-level websites
The href attribute specifies the destination URL or document location of an HTML hyperlink.
- How it is used
- Directs a website visitor to a page or a specific location when they click a hyperlink.
- How deep it goes
- Breaks down link markup and gives setup and testing steps, without extending into broader HTML internals.
- Examples
- Uses recipe-page links that open another page or jump to a named paragraph.
- What you can do after
- Apply it via the WordPress Text tab to create and test a link to a specified paragraph.
Read how WordPress Power Toolkit: Harness AI to build next-level websites explains href →
Web Design Playground, Second Edition
The href attribute is an HTML attribute that specifies the destination address of a hypertext link.
- How it is used
- Uses href on anchor elements to route clicks to local files, remote URLs, or locations within the same page.
- How deep it goes
- Defines the attribute, demonstrates syntax and address types, and notes case sensitivity; defers complex directory paths and anchor details.
- Examples
- Shows wordplay.html, a webdesignplayground.io URL, and links to “scofflaw” and “Frankenfood.”
- What you can do after
- Apply it via HTML to make clickable text open a local file, remote URL, or same-page target.
Read how Web Design Playground, Second Edition explains href →
Web Design Playground
An HTML attribute on an anchor element that specifies the destination resource of a hyperlink.
- How it is used
- Uses href to specify the resource opened when a reader activates an anchor link.
- How deep it goes
- Explains attribute syntax and local or remote destinations with examples, while deferring multiple directories and same-page anchors.
- Examples
- Demonstrates links to wordplay.html and http://wordspy.com/index.php, including clickable descriptive text.
- What you can do after
- Apply it via HTML by building links to local files or remote URLs with descriptive clickable text.
Also covered in
- Vanilla WebIn early access (MEAP)
- Build a Website with ChatGPT
- Software Engineering for Data ScientistsIn early access (MEAP)
- Tiny CSS Projects
What to know first
- HTMLHTML is the standard markup language for structuring content and elements in documents on the web.
- HTML tagAn HTML tag is angle-bracket-delimited markup that identifies, structures, or marks the boundary of an element in an HTML document.
- anchor elementAn anchor element is an HTML element that represents a hyperlink or navigation target, typically linking content to another resource or location.
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
Related concepts
- anchor elementused by · An anchor element is an HTML element that represents a hyperlink or navigation target, typically linking content to another resource or location.
- attributekind of · An attribute is a named property or piece of information associated with an entity, object, or structured data item.
- hyperlinkused by · A hyperlink is a reference in digital content that identifies another resource or location and enables navigation to it.
- link elementpart of · The HTML link element declares a relationship between a document and an external resource, such as a stylesheet or icon.
- uriuses · A URI (Uniform Resource Identifier) is a standardized sequence of characters that identifies an abstract or physical resource.
Questions about href
What is href?
The href attribute of an HTML anchor specifies the destination resource, URL, or fragment of a hyperlink.
Which Manning books explain href?
WordPress Power Toolkit: Harness AI to build next-level websites, Web Design Playground, Second Edition and Web Design Playground.
What should I know before learning href?
Manning books that teach href usually introduce HTML, HTML tag, anchor element and CSS first.
What is href a kind of?
Href is a kind of attribute. An attribute is a named property or piece of information associated with an entity, object, or structured data item.
What is href part of?
Href is part of link element. The HTML link element declares a relationship between a document and an external resource, such as a stylesheet or icon.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


