<html lang="en">
<head>
<title>…</title>
<meta name="robots" content="noindex, nofollow" />
</head>
<body>
…
</body>
</html>Web accessibility for seizures and physical reactions
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
div {
animation-play-state: paused;
}div {
transition-duration: 0s;
}<video controls>
<source src="video.mp4" type="video/mp4" />
<source src="video.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video><video controls>
<source src="myVideo.mp4" type="video/mp4" />
<source src="myVideo.webm" type="video/webm" />
<p>
Your browser doesn't support HTML video. Here is a
<a href="myVideo.mp4">link to the video</a> instead.
</p>
</video><audio controls>
<source src="myAudio.ogg" type="audio/ogg" />
<source src="myAudio.mp3" type="audio/mpeg" />
<p>
Your browser does not support the audio element. Here is a
<a href="myAudio.mp3">link to the audio</a> instead.
</p>
</audio><video src="adverts.cgi?kind=video" controls autoplay loop muted></video>document.getAnimations().forEach((animation) => {
animation.playbackRate *= 0.5;
});<body>
<input type="button" value="Set paragraph background color" />
<p>hi</p>
<p>hello</p>
</body>function setBackground() {
// now, get all the p elements in the document
const paragraphs = document.getElementsByTagName("p");
// get the second paragraph from the list
const secondParagraph = paragraphs[1];
// set the inline style
secondParagraph.style.background = "red";
}
document.querySelector("input").addEventListener("click", setBackground);<head>
<title>Home Page</title>
<link href="main.css" rel="stylesheet" title="Default Style" />
<link
href="alternate1.css"
rel="alternate stylesheet"
title="Alternate One" />
<link
href="alternate2.css"
rel="alternate stylesheet"
title="Alternate Two" />
</head>@import "alternate1.css";
@import "alternate2.css";img {
display: none;
}@media screen and (prefers-reduced-motion: reduce) {
}
@media screen and (prefers-reduced-motion) {
}button {
animation: vibrate 0.3s linear infinite both;
}
@media (prefers-reduced-motion: reduce) {
button {
animation: none;
}
}@media (prefers-color-scheme: dark) {
/* adjust styles for dark mode */
}@media screen and (prefers-reduced-motion: reduce), (update: slow) {
* {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important; /* Hat tip Nick/cssremedy (https://css-tricks.com/revisiting-prefers-reduced-motion/#comment-1700170) */
transition-duration: 0.001ms !important;
}
}