The options I know of are <svg>, <object>, <embed>, <img>, and <iframe>. What are their relative merits and drawbacks? Are there any others?
The options I know of are <svg> , <object> , <embed> , <img> ,
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
<iframe>,<embed>and<object>all embed external svg files and they all allow scripting.<embed>seems to be more or less the de facto standard. The HTML5 spec says:The iframe element represents a nested browsing context.
The embed element represents an integration point for an external (typically non-HTML) application or interactive content.
The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin.
<svg>is for inline svg content only but can contain<image>elements with external content.<img>and nested<image>elements does NOT allow scripting.Sources: