Instead of img tag use image control
<asp:image id="imgServerOnline" runat="server" alt="serverstatus" xmlns:asp="#unknown"></asp:image>
or if you still want img tag then add id & runat attribut to img tag. Set its src property to image url from codebehind.
On server side in code behind
add this code
Bool IsServerOnline;
if(IsServerOffline)
{
imgServerOnline.ImageUrl="Images/Online.png"
}
else
{
imgServerOnline.ImageUrl="Images/Offline.png"
}