Sign up and we'll send you the best freelance opportunities straight to
your inbox.
We're building the largest freelancing marketplace for people like you.
And so, my fellow Americans: ask not what your country
can do for you – ask what you can do for your country.
My fellow citizens of the world: ask not what America
will do for you, but what together we can do for the
freedom of man.
-- President Kennedy, 1961, Inaugural address.
<style>.blue-edge {border-left:4px solid lightblue; padding-left:15px;}</style><article><blockquoteclass="blue-edge">
And so, my fellow Americans: ask not what your country
can do for you – ask what you can do for your country.
My fellow citizens of the world: ask not what America
will do for you, but what together we can do for the
freedom of man.
</blockquote>
-- President Kennedy, 1961, Inaugural address.
</article>
A class attribute styling a <blockquote> tag.
Clicking the button toggles a classname that changes the border color.
And so, my fellow Americans: ask not what your country
can do for you – ask what you can do for your country.
My fellow citizens of the world: ask not what America
will do for you, but what together we can do for the
freedom of man.
-- President Kennedy, 1961, Inaugural address.
<style>.blue-edge { border-left:4px solid lightblue; padding-left:15px;}.red-edge { border-color: orangered;}</style><article><blockquoteclass="blue-edge"id="kennedyquote">
And so, my fellow Americans: ask not what your country
can do for you – ask what you can do for your country.
My fellow citizens of the world: ask not what America
will do for you, but what together we can do for the
freedom of man.
</blockquote>
-- President Kennedy, 1961, Inaugural address.
</article><br/><br/><buttononclick="toggle();">Toggle class</button><script>
let toggle =()=>{
let element = document.getElementById("kennedyquote");
element.classList.toggle("red-edge");}</script>
Code explanation
Two CSS classes are defined in the <style> element.
Sign up and we'll send you the best freelance opportunities straight to
your inbox.
We're building the largest freelancing marketplace for people like you.