You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
This task is API fetching a helper code is provided below to ease your task.
Task
Create a html file task9.html that consist of a profile page of user having.
A profile avatar, name and bio below the avatar.
Followed by other details containing age, gender, email, location, occupation, and hobbies.
Add appropriate styling according to your personal preference.
Script
All details must be fetched from the API that has the URL https://cc-bhu.github.io/web-development/assets/api/person.json.
This code block might assist you.
// Fetch is a method to perform API callfetch(url).then(response=>response.json()).then(data=>{// Get element and change its innerHTML, use `data.name` or `data["name"]`.document.getElementById("name").innerHTML=data["name"];});
To debug, you can use console.log(data); to log the data in developer tools -> console.
This task is API fetching a helper code is provided below to ease your task.
Task
Create a html file
task9.html
that consist of a profile page of user having.avatar
,name
andbio
below the avatar.age
,gender
,email
,location
,occupation
, andhobbies
.Script
All details must be fetched from the API that has the URL
https://cc-bhu.github.io/web-development/assets/api/person.json
.This code block might assist you.
To debug, you can use
console.log(data);
to log the data in developer tools -> console.Demo
Resources
The text was updated successfully, but these errors were encountered: