Nitric acid
..
:
..
H
O
O
O
N
:
:
..
..
¥Oxygen has 4 electrons in covalent bonds.
¥Assign 2 of these 4 electrons to O.
¥Oxygen has 2 unshared pairs.  Assign all 4 of these electrons to O.
¥Therefore, the total number of electrons assigned to O is 2 + 4 = 6.
Formal charge of O