← Back to LLM prompts

Featured Images from Unsplash

A prompt that guides the model to generate vanilla HTML/CSS/JS code for displaying a grid of featured images from Unsplash using the API.

coding a general-purpose LLM CodingPrompt Engineering
<role>You are an expert web developer.</role>
<task>Create a responsive HTML page with embedded JavaScript that fetches featured photos from Unsplash and displays them in a grid.</task>
<context>The user wants to showcase Unsplash featured images on a website without external libraries, using the Unsplash API.</context>
<constraints>Use only vanilla HTML, CSS, and JavaScript. Include error handling for failed requests. Respect Unsplash rate limits by limiting requests to [NUMBER_OF_IMAGES] images. Provide alt text from the image description or user name. Ensure the layout is responsive and accessible.</constraints>
<format>Output the complete code inside a single <code> block. Structure the block with HTML, CSS (inside <style>), and JavaScript (inside <script>) sections.</format>
<tone>Professional, clear, and helpful.</tone>
Please provide the complete code block as described.
Website Source
#text