Canvas Editor is removing my Anchor Tags when I edit the page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm creating a home page for one of our courses, with 'quick navigation' buttons so our students have easy access to different parts of the course.
When I add an anchor tag to the entire div for the button, it works fine (see code example below)
<a href="https://aitt.instructure.com/courses/56/modules"><div>
<h3>Modules</h3>
<span>View all modules for this course.</span></div></a>
However, when I go to edit the page again, say to add another anchor tag to another div, or edit the content in another section on the page - it removes the anchor tag completely. (see code example below).
<div>
<h3>Modules</h3>
<span>View all modules for this course.</span></div>
Any idea what's causing this? If I use the Rich Content Editor I can use the 'Link to URL' to have the text (the h3 and span) to link to the page, but not my entire div (the button) which I would greatly prefer.
Cheers,
Liam
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my case, I tried wrapping figure tag (with image tag and figcaption tags) with the anchor tag to my link which, not relevantly, redirected to another course link. This is valid in HTML5, but not Canvas. Without a text field inside the Anchor tags, Canvas read these as empty tags and stripped them from the page.
My workaround was to remove the figcaption and stylize the text link instead. I also wrapped these in div tags to position the text.
You can wrap an image or figure in anchor tags, but in Canvas, you also need to include text, separate from the image caption for the link to 'stick.'