HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>Great: we have learned how to scroll down the page using JavaScript! We need the page to scroll back up to the beginning when the user clicks on the “Up” button.</p>
1 <p>Great: we have learned how to scroll down the page using JavaScript! We need the page to scroll back up to the beginning when the user clicks on the “Up” button.</p>
2 <p>We already found the button. Now we need to add the onclick<a>event handler</a>to it. After that, transfer the instruction with scrollTo inside the handler and verify that when you click on the button, the page scrolls back up to the beginning.</p>
2 <p>We already found the button. Now we need to add the onclick<a>event handler</a>to it. After that, transfer the instruction with scrollTo inside the handler and verify that when you click on the button, the page scrolls back up to the beginning.</p>
3 <p>By default, automatic scrolling occurs very quickly in browsers: it seems to instantaneously jump back to the top of the page. It in order to make the transition less abrupt, we used the scroll-behavior CSS property with the smooth value. You can find out more about this property from the<a>specification</a>. Note that this type of <a>scrolling can make some people sick</a>, and Operating Systems allow them to indicate that they prefer reduced motion. CSS can use the<a>Reduced Motion Media Query</a>to override smooth scrolling for people with vestibular disorders.</p>
3 <p>By default, automatic scrolling occurs very quickly in browsers: it seems to instantaneously jump back to the top of the page. It in order to make the transition less abrupt, we used the scroll-behavior CSS property with the smooth value. You can find out more about this property from the<a>specification</a>. Note that this type of <a>scrolling can make some people sick</a>, and Operating Systems allow them to indicate that they prefer reduced motion. CSS can use the<a>Reduced Motion Media Query</a>to override smooth scrolling for people with vestibular disorders.</p>