Display The Image On The Page

We're making our request to Unsplash, it's returning a response that we're then converting to JSON, and now we're seeing the actual JSON data. Fantastic! All we need to do now is display the image and caption on the page.

Here's the code that I'm using:

This code will be working following way
  • get the first image that's returned from Unsplash
  • create a <figure> tag with the small image
  • creates a <figcaption> that displays the text that was searched for along with the first name of the person that took the image
  • if no images were returned, it displays an error message to the us



Post a Comment