gpt-4.1-mini-2025-04-14· openai
WildChat-4.8M
show html and svg in it
- User
show html and svg in it
- Assistant
Certainly! Below is a simple example of an HTML file that includes inline SVG. This example displays a basic SVG graphic (a red circle and a blue rectangle) inside an HTML page:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>HTML with Inline SVG Example</title> </head> <body> <h1>SVG inside HTML</h1> <!-- Inline SVG starts here --> <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <!-- Red circle --> <circle cx="60" cy="60" r="50" fill="red" /> <!-- Blue rectangle --> <rect x="110" y="30" width="80" height="100" fill="blue" /> </svg> </body> </html>How this works:
- The
<svg>element is embedded directly inside the HTML<body>. - The SVG draws a red circle centered at (60, 60) with radius 50.
- The SVG also draws a blue rectangle positioned at (110, 30) with width 80 and height 100.
You can save this code as an
.htmlfile and open it in a modern web browser to see the output. Let me know if you want a more complex SVG example! - The
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.