What do I need to write in CSS to achieve -p{Background color: yellow;}">
How to use CSS to change the background color of a paragraph after clicking a link in an HTML page-PHP Chinese Network Q&A
You cannot change the properties of an element by clicking on another element, but you can do so through JavaScript. Just add thetag at the end of yourtag andonclick on thetag ()event:
You cannot change the properties of an element by clicking on another element, but you can do so through JavaScript. Just add the
tag at the end of your
tag and
onclick on the
tag ()
event: