0
[SOLVED] HTML Link button redirects to YouTube.com instead of YouTube video link
I’m trying to put a button that says “The Nothing button” that rickrolls you on my site. However it takes you to the YouTube homepage instead. Can someone help? ::: <form action= "https://www.youtube.com/watch?v=dQw4w9WgXcQ"> <input type="submit" value= "The nothing button" /> </form> :::
3 Respostas
0
<!-- Write the following code in the HTML file-->
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">The Nothing button</a>
</body>
</html>
/* Write the following code in the CSS file */
body {
margin:100px;
}
a{
text-decoration:none;
color:#000;
background-color:#ccc;
border-radius:5px;
padding:10px;
}
+ 2
Is it important that you use a form?
If it was only about opening the link on click, you could use a link/ anchor tag <a>
+ 2
<form action="https://www.youtube.com/embed/dQw4w9WgXcQ">
<input type="submit" value= "The nothing button" />
</form>