cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dmcclain
Community Participant

Links on a page.

Jump to solution

I have done links on a page and they open in a new window.  The last link I did will not open a new window.  What do I do to get the link to open in a new window

Tags (5)
1 Solution

Accepted Solutions
abunag
Community Champion

if the link goes outside of Canvas, it should automatically open in a new window.  however, if you're pointing somewhere on your own Canvas instance (such as to an assignment page pointing to a content page) it won't do it automatically.

Either way, you can edit the HTML.  You can add a [target="_blank"] to the link and it'll open a new tab.  Example:

<a href="https://canvas.instructure.com/courses/1/assignments" target="_blank">Visit the Assignments page!</a>

View solution in original post

9 Replies
abunag
Community Champion

if the link goes outside of Canvas, it should automatically open in a new window.  however, if you're pointing somewhere on your own Canvas instance (such as to an assignment page pointing to a content page) it won't do it automatically.

Either way, you can edit the HTML.  You can add a [target="_blank"] to the link and it'll open a new tab.  Example:

<a href="https://canvas.instructure.com/courses/1/assignments" target="_blank">Visit the Assignments page!</a>

View solution in original post

dmcclain
Community Participant

I have tried several times with no luck.  This is what I am entering https://abileneschools.test.instructure.com/login/canvas"target="_blank"

this is what the link looks like when I go back and check it

https://abileneschools.test.instructure.com/login/canvas%22target=%22_blank%22

abunag
Community Champion

You need to switch to the HTML editor.  In the rich text editor, it should be a link towards the top right.  Once you click on it, find your link which should start with "a href=", then paste the target="_blank" in the bracket.

canvas_admin
Community Champion

You can also try using Ctrl-K (or Cmd-K if on Mac) to create a link on your page and you can select current or new window for the link to open.

Hi  @dmcclain ​...

To piggy-back on what  @abunag ​ has already said...and for the sake of completeness, you're going to eventually have a code (in the HTML side of your content page...as Anthony has said) that will look something like this:

<p><a title="Hover Text" href="https://abileneschools.test.instructure.com/login/canvas" target="_blank">linked website</a></p>

The "Hover Text" text can be replace with anything you want, and that will be text that will "pop up" when people hover their mouse over it (also great for those with screen readers).  The "linked website" text can also be replaced with the wording you'd like your students to see on the page itself (the words students will click on).

Hope this helps!

I love tihs keyboard shortcut but I always forget about it when training! Thanks for reminding me to spread the info.

lmd5
Community Participant

It would be lovely if we could make the decision to have the mobile app open any link with target="_blank" in a browser window.  This is really affecting our content that we have on an external location.

And you are not alone on that, see here: Force external Web links to display in Browser?

I was going to suggest creating a feature idea but it looks like you've already done that so I will mention it here for discoverability:

lmd5
Community Participant

Thanks for placing the link here.  Yes, this is critical for our mobile users.  At this point, we are making a decision as to recommending our students to use the mobile app or not.  If we can't get the behavior of our pages to function properly in a browser environment, we will have to recommend that they use a browser on their mobile device.  (This was not the behavior of the mobile app when we were piloting Canvas.)