Certainly! Below is an HTML page template with an embedded SVG drawing of a village house with a lake in front of it, a tree to the right of it, and the sun in the sky on the left.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Village House SVG</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #87CEEB; /* Sky blue background */
}
svg {
border: 1px solid #000;
}
</style>
</head>
<body>
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg">
<!-- Sky -->
<rect width="100%" height="100%" fill="#87CEEB"/>
<!-- Sun -->
<circle cx="100" cy="100" r="50" fill="#FFD700"/>
<!-- Lake -->
<rect x="0" y="400" width="800" height="200" fill="#ADD8E6"/>
<!-- House -->
<rect x="300" y="250" width="200" height="200" fill="#8B4513" /> <!-- House body -->
<polygon points="300,250 400,150 500,250" fill="#A0522D"/> <!-- Roof -->
<rect x="350" y="350" width="50" height="100" fill="#000000"/> <!-- Door -->
<rect x="320" y="300" width="50" height="50" fill="#FFFFFF"/> <!-- Window 1 -->
<rect x="430" y="300" width="50" height="50" fill="#FFFFFF"/> <!-- Window 2 -->
<!-- Tree -->
<circle cx="650" cy="350" r="50" fill="#228B22"/> <!-- Tree top -->
<rect x="640" y="400" width="20" height="100" fill="#8B4513"/> <!-- Tree trunk -->
</svg>
</body>
</html>
Explanation:
-
Background:
- The
body is styled to be a flex container, centering the SVG both horizontally and vertically.
- The background colour of the body is set to
#87CEEB, a sky blue colour.
-
SVG:
- The SVG element has a width of 800 and a height of 600.
- The entire SVG is filled with a sky blue colour (
#87CEEB) to represent the sky.
-
Sun:
- A circle with a cx of 100, cy of 100, and a radius of 50 is drawn to represent the sun.
- The sun is filled with a yellow colour (
#FFD700).
-
Lake:
- A rectangle with x of 0, y of 400, width of 800, and height of 200 is drawn to represent the lake.
- The lake is filled with a light blue colour (
#ADD8E6).
-
House:
- The body of the house is a rectangle with x of 300, y of 250, width of 200, and height of 200.
- The house body is filled with a brown colour (
#8B4513).
- The roof of the house is a polygon with points "300,250 400,150 500,250".
- The roof is filled with a darker brown colour (
#A0522D).
- The door is a rectangle with x of 350, y of 350, width of 50, and height of 100.
- The door is filled with a black colour (
#000000).
- The windows are rectangles with x of 320, y of 300, width of 50, and height of 50 for the first window and x of 430, y of 300, width of 50, and height of 50 for the second window.
- The windows are filled with a white colour (
#FFFFFF).
-
Tree:
- The top of the tree is a circle with a cx of 650, cy of 350, and a radius of 50.
- The tree top is filled with a green colour (
#228B22).
- The trunk of the tree is a rectangle with x of 640, y of 400, width of 20, and height of 100.
- The tree trunk is filled with a brown colour (
#8B4513).
Copy and paste the code into an HTML file and open it in a web browser to see the SVG drawing.