In the following example, we have an input field and a button element. We will enter some random URL in the input field and upon click of a button, we will load that URL in a new window. Please have a look over the code example and the steps given below.
HTML & CSS
We have 3 elements in the HTML file (div, input, and button).
The innerText for the button element is ”Open”.
We have done some basic styling using CSS and added the link to our style.css stylesheet inside the head element.