This solution is based on Mozilla specific CSS extension. Other browsers will ignore this rule.
@-moz-document url-prefix() {
H5 {
color: red;
}
P {
margin-left: 20px;
}
/* other special styles for FireFox here */
}