The letters H and B on a pencil indicate where it sits on the graphite grading scale. The industry standard is usually to place the letters next to each other, but spacing them out is just a quirk of manufacturing that means nothing.
"H" stands for the hardness of the core and "B" for the blackness of the graphite. HB pencils are considered to be at the top of the hardness scale but the bottom of the blackness scale. Softer pencils will have a number in front of the H, and darker pencils will have a number in front of the B. Older pencils may use multiple letters instead of numbers.