liveBook · Manning

Href

As explained in WordPress Power Toolkit: Harness AI to build next-level websites

The href attribute specifies the destination URL or document location of an HTML hyperlink.

The href attribute tells a hyperlink where to go when someone clicks it. Inside an opening <a> tag, it holds the destination URL; the link’s visible caption sits between the opening and closing tags. section 3.5.2

Use href to create a useful link in three steps:

  • Choose the destination page and copy its permalink. section 3.5.2
  • Place that URL after href= in the opening <a> tag, using straight quotation marks. section 3.5.2
  • Add a readable link caption, save the page, and test the link on the site’s frontend. section 3.5.2

Link to a page section

To send visitors directly to a paragraph rather than the top of a page, add the page URL followed by # and that paragraph’s ID. The ID itself does not include the #. section 3.5.2

<a href="https://www.timetestedrecipes.com
/mexican-specialties/#mextarget">
Visit the second paragraph in the Mexican recipes page</a>

This example combines a page permalink and #mextarget in href to jump directly to a named location. section 3.5.2

How WordPress Power Toolkit: Harness AI to build next-level websites covers it

How deep it goes
Explains href syntax through link-building steps and a cross-page fragment example, without broader HTML internals.
Examples
Uses Mexican and Thai recipe pages to link to a specific paragraph named mextarget.
What it assumes
Introduces the needed HTML link parts while using WordPress page editing and permalinks.
What you can do after
Apply it via WordPress to create and test page links and links to named page locations.
How it connects
Connects hyperlinks with HTML anchor tags, permalinks, IDs, and fragment identifiers.

Also explained in

Compare how 3 books explain href →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of WordPress Power Toolkit: Harness AI to build next-level websites. The section links point to the parts of the book it draws on.