svg文件未显示在html中

svg文件未显示在html中,html,svg,Html,Svg,svg文件pushpop.svg不会显示。 代码是: <html> <head> </head> <body style="background:black;color:white"> <h1>Primitive operations :-</> <ol> <li>Push :- Place the new item on stack.Value of top gets incremented by

svg文件pushpop.svg不会显示。 代码是:

<html>
<head>
</head>
<body style="background:black;color:white">

<h1>Primitive operations :-</>
<ol>
<li>Push :- Place the new item on stack.Value of top gets incremented by one.</li>
<li>Pop :- Remove the item from top of the stack.Value of top decreases by one.</li>
</ol>
<img src="pushpop.svg" alt="Kiwi standing on oval">

</body>
</html>
尝试:

尝试:


查看您的代码,我建议进行以下两种编辑

关闭你的H1标签!听起来很简单,打开标签可能会产生连锁反应

此外,您没有doctype,这也可能会影响svg,具体取决于浏览器

试试这个代码

<!DOCTYPE html>
<html>
<head></head>
<body style="background:black;color:white">

<h1>Primitive operations :-</h1>
<ol>
    <li>Push :- Place the new item on stack.Value of top gets incremented by one.</li>
    <li>Pop :- Remove the item from top of the stack.Value of top decreases by one.</li>
</ol>
<img src="pushpop.svg" alt="Kiwi standing on oval">
</body>
</html>

查看您的代码,我建议进行以下两种编辑

关闭你的H1标签!听起来很简单,打开标签可能会产生连锁反应

此外,您没有doctype,这也可能会影响svg,具体取决于浏览器

试试这个代码

<!DOCTYPE html>
<html>
<head></head>
<body style="background:black;color:white">

<h1>Primitive operations :-</h1>
<ol>
    <li>Push :- Place the new item on stack.Value of top gets incremented by one.</li>
    <li>Pop :- Remove the item from top of the stack.Value of top decreases by one.</li>
</ol>
<img src="pushpop.svg" alt="Kiwi standing on oval">
</body>
</html>

尝试关闭h1标记尝试给a宽度和高度。@Sirko仍然没有显示图像。.检查以确保您的服务器配置为以正确的类型提供svg文件:image/svg+xml尝试关闭h1标记尝试给a宽度和高度。@Sirko仍然没有显示图像。.检查以确保您的服务器是正确的配置为以正确的类型提供svg文件:image/svg+xml