An Alert Message


place this CSS code in between <head>  </head> section.
<!--css start-->
<style>
.alrt {
    padding: 20px;
    background-color:#f2f2f2;
    color: #cc0412;
    border: 1px solid #02622880;
}

.closebtn {
    margin-left: 15px;
    color:red;
    font-weight: bold;
    float: right;
    font-size: 25px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.closebtn:hover {
    color: black;
}
</style>
<!--css end-->


HTML place this code wherever you want to appear on your page.
<!--html start-->
<div class="alrt">
  <span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span>
<img src="https://4.bp.blogspot.com/-f7hJyneVxuI/XCRb5fhLUoI/AAAAAAAACqY/zKNllnc2f5A99i7kFD-BSTRSfM2eHghVwCLcBGAs/s1600/css-html-script-use.jpg" />
 </div>
<!--html end-->