liveBook · Manning

Hypertext link

As explained in Build a Website with ChatGPT

A hyperlink is an interactive reference in web content that takes a user to another page, section, or resource when activated.

A hypertext link is clickable text that takes a visitor to another page, section, or web resource. In HTML, the <a> element creates the link, while its href attribute holds the destination address, often called a URL. section 6.2.1

Choose the href value according to where the destination is located:

  • Link to a page in the same directory by naming its file, such as about.html. section 6.2.1
  • Include the directory path when the destination is elsewhere, such as /faq/index.html for a root-level directory. section 6.2.1
  • Link to an external page with its full address, such as a Wikipedia URL. section 6.2.1

A link to an About page

Use <a href="about.html">About</a>. The visible word is About, and activating it navigates to about.html. A collection of similar links can form a navigation bar for the site's main pages. section 6.2.1 section 6.6

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

Inspect the compact HTML pattern for a same-directory link, then adapt its visible text and href destination. section 6.2.1

How Build a Website with ChatGPT covers it

How deep it goes
Explains the anchor element, href attribute, filenames, directory paths, and external URLs, but stops short of advanced link behavior.
Examples
Uses about.html, /faq/index.html, and a Wikipedia rutabaga page as link destinations.
What it assumes
Assumes basic web-page files and directories while teaching link syntax and path choices directly.
What you can do after
Build it from scratch by writing anchor elements with appropriate visible text and href destinations.
How it connects
Connects HTML, URLs, web pages, directories, and navigation bars.

Also explained in

Compare how 9 books explain hypertext link →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Website with ChatGPT. The section links point to the parts of the book it draws on.