Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS HTML Link

sajithart

New Coder
I recently started learning HTML and CSS as an SNHU MS student. I was instructed to establish a link in a page (tag a) so that when someone clicks on it, an external website will load. It loads for the majority of the website, but not for https://www.google.com - Should I take any special measures for Google or google wont allow to display from another website ?
Code:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<a href="https:\\www.google.com" >Click here</a>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
 
Solution
D
Ah right, you didn't mention you were using a frame. Indeed, some websites don't like getting framed 😁
Nothing much to be done about that. Though perhaps you can fiddle with the request headers, see console error below.

The error I get from Chrome is quite misleading :
b.jpg
but when you bring up the debugger, the console message explains it better:

c.jpg
Your code works fine for me, using Chrome. Google.com doesn't mind being linked to.
What browser are you using ? I notice you use backslashes in the URL, can you try with forward slashes ?
 
Your code works fine for me, using Chrome. Google.com doesn't mind being linked to.
What browser are you using ? I notice you use backslashes in the URL, can you try with forward slashes ?
Thanks for your response . I am using chrome. , I tried in IE and it shows a message "This content cannot be displayed in a frame" seems google has disabled the feature of displaying the page inside a frame.
 
Ah right, you didn't mention you were using a frame. Indeed, some websites don't like getting framed 😁
Nothing much to be done about that. Though perhaps you can fiddle with the request headers, see console error below.

The error I get from Chrome is quite misleading :
b.jpg
but when you bring up the debugger, the console message explains it better:

c.jpg
 
Solution
Ah right, you didn't mention you were using a frame. Indeed, some websites don't like getting framed 😁
Nothing much to be done about that. Though perhaps you can fiddle with the request headers, see console error below.

The error I get from Chrome is quite misleading :
View attachment 1680
but when you bring up the debugger, the console message explains it better:

View attachment 1681
perfect- Thank you so much for the explanation
 

New Threads

Buy us a coffee!

Back
Top Bottom