Upon notice from the inspector, work on any building or structure that is being performed contrary to the provisions of this chapter or in a dangerous or unsafe manner, shall be immediately stopped. Such notice shall be in writing and shall be given to the owner of the property, or to his agent, or to the person doing the work, or posted in a prominent place on the work site, and shall state the conditions under which work may be resumed. Where an emergency exists, written notice shall not be required to be given by the inspector.