I also recommend you first understand the functionality of this project and then at least try once by yourself to create this project. and then if you got stuck then you can use my code or take help from my code given below.
The Logic of the project.
As you see in the given above image, first of all, we are going to print the heading “Information about a Github user” on the top of the page and then we are going to create a simple form that has only one input field. and then a submit button. and whenever a user enters a name in the input field and clicks on the submit button. then using the API of GitHub we are going to print the information about that user related to the username.
First, we are going to print the image associated with that user and then we are going to print the name of that user and then the URL of his blog.
Code of the Project
Explanation of code
First of all, in the body section of the HTML file, we define an H1 tag. and print the message. after that, we define a form field in which we define an input field and a submit button. after that, we define an empty div element which we are going to use for printing the user information.
after that, we use the id of the empty div component we are going to print the information on the page. and then we are catching the error and printing on the console.