JSFiddle - React, Tailwind, and code Playground

HTML

<div id="wrapper">
    <center>
        <div id="except"></div>
    </center>
</div>

CSS

#wrapper {
    background-color: blue;
    height: 250px;
    padding-top: 20px;
}
#except {
    background-color: pink;
    height: 100px;
    width: 80%;
}

JavaScript

var body = document.getElementById('wrapper');
var except = document.getElementById('except');

body.addEventListener("click", function () {
    alert("wrapper");
}, false);
except.addEventListener("click", function (ev) {
    alert("except");
    ev.stopPropagation();
}, false);