A hitter must have both feet inside the batter’s box to be legal. The lines are part of the batter’s box and therefore a batter is legally occupying the box as long as both feet are inside or touching the lines.The batter can not legally make contact with the ball if either of his feet are outside the box.
This rule is the same in High School and Major League Baseball.
Remember
As long as both feet are inside the box or making contact with the lines of the box, they may legally hit a pitched ball
Coaching Note:
This is most likely to come into question during a bunt attempt. The batter is allowed to step in toward and on home plate to make contact with the ball as long as his feet remain on the line or inside the box.