---
title: p.hazard.typeof
description: "## Syntax **p.hazard.typeof**(type) type type of hazard; may be notice, caution, warning, or danger **p.hazard.consequence** **p.hazard.avoid** ## Purpose Hazard statements are used to warn the reader of possible problems and tell the reader how to avoid the issue. They usually…"
url: "https://www.stilo.com/docs/migrate/notes-and-hazard/p-hazard-typeof/"
updated: "2021-04-29"
category: Annotations / Notes and Hazard
tags:
  - Annotations
---

# p.hazard.typeof

## Syntax

**p.hazard.typeof**(type)

type

type of hazard; may be notice, caution, warning, or danger

**p.hazard.consequence**

**p.hazard.avoid**

## Purpose

Hazard statements are used to warn the reader of possible problems and tell the reader how to avoid the issue. They usually also list consequences of ignoring the hazard statement. One or more safety symbols may also be included. The statements must be in the order type, consequence, avoid.

*Example:*

Here is a sample notice:

[![Sample hazard notice](https://www.stilo.com/wp-content/uploads/2021/03/hazard-statement-original.png)](https://www.stilo.com/wp-content/uploads/2021/03/hazard-statement-original.png)

Here is what your rules may look like:

[![Sample hazard notice rules](https://www.stilo.com/wp-content/uploads/2021/03/hazard-statement-rules.png)](https://www.stilo.com/wp-content/uploads/2021/03/hazard-statement-rules.png)

This is what your output may look like:

```
<hazardstatement type="notice">
  <messagepanel>
    <typeofhazard>Shallow pipes</typeofhazard>
    <consequence>Pipes may freeze if cold water is not left running. 
                 Frozen pipes may burst.
    </consequence>
    <howtoavoid>Keep a cold water tap running through the freezing 
                months with stream the size of a pencil.
    </howtoavoid>
  </messagepanel>
</hazardstatement>
```
