gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
generate svg in html
- User
generate svg in html
- Assistant
Sure! Here's a simple example of how to include an SVG graphic directly inside an HTML file:
html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>SVG in HTML Example</title> </head> <body> <h1>My SVG Graphic</h1> <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Example SVG"> <!-- A red circle --> <circle cx="100" cy="100" r="80" fill="red" /> <!-- Blue rectangle --> <rect x="50" y="50" width="100" height="50" fill="blue" /> <!-- Black line --> <line x1="0" y1="0" x2="200" y2="200" stroke="black" stroke-width="2" /> <!-- Text --> <text x="100" y="190" font-family="Arial" font-size="20" text-anchor="middle" fill="white">SVG</text> </svg> </body> </html>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.