Oh, In that case I was wrong with my guess.
I get asked about defensive fouls because many people think you roll the down. That would effectively be a loss of down penalty, which is never applicable to the defense.
For example, Team A has the ball first and 10, gains 4 yards but there is a 5-yard facemask call. Seems right that it would be a total of 9 yards gained, but sometimes it's hard to wrap your mind around the fact it's now 1st and 1, instead of 2nd and 1.
BTW, you're citing NFL rules. There is no illegal contact foul in h.s. (or NCAA) and holding is 10 yards for both teams, no automatic 1st, in h.s. and NCAA.