W3C-Validator | Pure Python command line for HTML validation using W3C | Validation library
kandi X-RAY | W3C-Validator Summary
kandi X-RAY | W3C-Validator Summary
Pure Python command line for HTML validation using W3C online validator
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of W3C-Validator
W3C-Validator Key Features
W3C-Validator Examples and Code Snippets
Community Discussions
Trending Discussions on W3C-Validator
QUESTION
i am unable to validate my image elements and unable to find the reason. The sizes element works as expected, Chrome loads the correct image.
The W3C-Validator says the following:
Bad value (max-width:768px)100vw, (min-width: 768px)45vw for attribute sizes on element img: Bad CSS number token: Expected a minus sign or a digit but saw ( instead at (max-width:768px)100vw,
This is my current markup.
...ANSWER
Answered 2021-Oct-12 at 09:28I think you need to add a space between the media query and the size: change (max-width:768px)100vw
to (max-width:768px) 100vw
.
From MDN:
sizes
defines a set of media conditions (e.g. screen widths) and indicates what image size would be best to choose, when certain media conditions are true — these are the hints we talked about earlier. In this case, before each comma we write:
- A media condition (
(max-width:600px)
) — you'll learn more about these in the CSS topic, but for now let's just say that a media condition describes a possible state that the screen can be in. In this case, we are saying "when the viewport width is 600 pixels or less".- A space
- The width of the slot the image will fill when the media condition is true (480px)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install W3C-Validator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page