+ 4
What is the use of path element in HTML 5. I dont understand it. How does it work? Please help.
3 ответов
+ 9
The <path> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more. Paths create complex shapes by combining multiple straight lines or curved lines. Complex shapes composed only of straight lines can be created as <polyline>
+ 4
The path element is not an HTML element. XHTML and SVG are both so-called "applications" of XML. XML is like a mother-language and XHTML and SVG are like dialects. It does look very similar to HTML but it's not HTML, if you search a list of all the HTML elements in google SVG elements won't be in there. If you learn SVG more you will notice that all SVG elements should be closed, and I think they are case sensitive too.
Anyways, the path element is used to draw inside an SVG container, imagine a virtual pen, you can give directions to that pen and form lines and curves, arcs are the hardest to understand in my opinion, curves and lines are easier, search for tutorial online if you want because seeing someone use it is better than reading how it works, and of course play around with it in your code editor.
+ 2
You can check my SVG notes if you want, go straight to paths where I explain how they work in an easy way to understand: http://karak10notes.c1.biz/Notes5.html