Drupal 8 Training: Anchors

Summary

How to use and build named anchors.

Body

Summary

Website & Mobile Development & Design (WMD) builds UNH websites on an open-source application called Drupal 8 (D8). This article provides you with information on the anchor elements of a webpage.

 

Content

Anchors

Anchor definition - The anchor element creates hyperlinks between a source anchor and a destination anchor Anchors can be set to scroll to a section on the same page or to a heading on a different page. They don't open accordions. D8 adds HTML anchor code to headings within the body, text paragraphs and inside accordions. It doesn't add anchors to paragraph titles. 
 
anchors
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Anchor code isn't seen in the source view, it's visible when the page is inspected. "Magic paragraph" doesn't have an anchor, but "Bring the magic" does.
 
anchor inspect code
 
 
 

Practice Exercise

This page in the Drupal demo site, https://drupal-demo.unh.test/d8extended/anchors contains anchors and instructions for how to build them.
 

Need additional help?

If you have any additional questions, please fill out the Website & Mobile Development & Design Support Form.

Details

Details

Article ID: 2100
Created
Tue 1/14/20 11:15 AM
Modified
Thu 7/11/24 2:02 PM
Applicable Institution(s):
Plymouth State University (PSU)
University of New Hampshire (UNH)
USNH System Office