简体   繁体   English

此时元素img上不允许使用属性img。

[英]Attribute img not allowed on element img at this point.Error

When you click the image in my html page, it opens that image's web page. 当您单击我的html页面中的图像时,它将打开该图像的网页。

I also named the images by class so I can adjust each image's specs in a separate CSS sheet. 我还按类命名图像,以便可以在单独的CSS表单中调整每个图像的规格。

Here is my code: 这是我的代码:

*/

<img class = "paypal" img src= "images/paypal.jpg" alt= "Logo for PayPal"> </a>

/*

Here is the error I'm getting: 这是我得到的错误:

"Error: Attribute img not allowed on element img at this point." “错误:此时元素img上不允许使用属性img。”

How can I maintain my goal of referencing each image separately while following syntax? 在遵循语法的同时,如何保持单独引用每个图像的目标?

It looks like you have an extra/erroneous "IMG" inside the image html element which is getting read as an attribute and causing the problerm 看来您在图像html元素中有一个额外的/错误的“ IMG”,该元素已作为属性被读取并引起问题

replace : 替换:

<img class = "paypal" img src= "images/paypal.jpg" alt= "Logo for PayPal">

with: 有:

<img class = "paypal" src= "images/paypal.jpg" alt= "Logo for PayPal">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 您好,我收到关于 img 的 HTML 代码错误 — 此时元素输入上不允许使用属性 img - Hello, I'm receiving an HTML code error regarding img — Attribute img not allowed on element input at this point 在这种情况下,元素img不允许作为元素图片的子元素 - Element img not allowed as child of element picture in this context 目前,元素视频上不允许使用属性类型。 如何解决这个错误? - Attribute type not allowed on element video at this point. how to fix this error? 错误:目前,元素li上不允许使用属性audio_url - Error: Attribute audio_url not allowed on element li at this point 验证错误:此时元素输入上不允许使用 onfocusout 属性 - Validation error: Attribute onfocusout not allowed on element input at this point 验证错误:“此时元素输入不允许属性只读。” - Validation error: “Attribute readonly not allowed on element input at this point.” 带有`lang`属性的`img`元素:图像本身的语言? - `img` element with `lang` attribute: language of the image itself? 图片(源)元素 VS img srcset 属性 - picture (source) element VS img srcset attribute 线周围 <img></img> 元件 - Line around <img></img> element 更改Img属性并填充数组错误 - Changing Img Attribute with filled array error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM