Forum digitalis

1.5 Links and navigation

Target Attribute

Using target="_blank" opens the link in a new browser tab or window. By default, links open in the same window.

Anchor Links

Anchor links jump to a specific section within the same page. This is done by using an element's ID in the href, e.g., <a href="#section1">.

Example

Below is a practical example showing external, internal, and anchor links.

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Links & Navigation</title> </head> <body> <h2>External Link</h2> <a href="https://rr-utilities.github.io/forumdigitalis/" target="_blank">Open Example Site</a> <h2>Internal Link</h2> <a href="about.html">Go to About Page</a> <h2>Anchor Link</h2> <a href="#section1">Jump to Section 1</a> <h2 id="section1">Section 1</h2> <p>Content of Section 1.</p> </body> </html>