Create a Line with HTML5 SVG - HTML CSS SVG

HTML CSS examples for SVG:Line

Description

Create a Line with HTML5 SVG

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head> 
  <meta charset="UTF-8"> 
  <title>Create a Line with HTML5 SVG</title> 
  <style type="text/css">
    svg {<!-- w  w w .j av  a  2s .  c o  m-->
        border: 1px solid black;
    }
</style> 
 </head> 
 <body> 
  <svg width="300" height="200"> 
   <line x1="50" y1="50" x2="250" y2="150" style="stroke:red; stroke-width:3;" /> 
  </svg>   
 </body>
</html>

Related Tutorials