<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>直线</title>
</head>
<body>
<svg width="600" height="600" xmlns="http://www.w3.org/2000/svg" version="1.1">
<line
x1="10"
y1="10"
x2="300"
y2="400"
style="stroke: gold; stroke-width: 20" />
</svg>
</body>
</html>
上述运行结果: