The metric system is owned and controlled by a UN agency called the Bureau Internationale des Poids et Mesures (BIPM). It defines the metric system and world-wide, the countries that are signed up to the International Convention of the Metre are bound to follow its definitions. The UK signed in 1875.
The BIPM standards are codified in the technical standards documents of the International Organization for Standardization (ISO). The ISO document that specifies physical units is ISO 80000, which replaces the earlier ISO 31. The BIPM publishes the SI brochure, which explains the system in detail. Chapter 5 give the details of you write metric symbols.
The principle thing to understand is that abbreviations to the unit names are not allowed. Instead, world-wide standardises symbols are used. Abbreviations are language-specific but symbols, like the arabic numerals, the chemical element symbols, the mathematical symbols e and π are language independent. The unit symbols have been chosen so they can be produced by any typewriter or computer keyboard but THEY ARE NOT TEXT. They are to be written in an upright Roman font and never put into upper case, or italics or bold. They do follow the font of the surrounding text. So, someone writing in Welsh might unse the unit name cilometr for the kilometre and that fine as a piece of text, but they should write the unit symbol as km, even though the Welsh language does not contain the letter k. It's not Welsh text, it's a symbol. If abbreviations were allowed and Welsh people abbreviated kilometre to cm there would be problems. The use of symbols avoids this sort of problem.
They are considered to be mathematical symbols. A physical quantity is considered to be a number multiplied by unit. Twenty-five kilograms is written 25 kg and the space represents the mulltiplaction symbol. The space should not be replaced by a hyphen when used in the adjectival sense. A dog weighing 20 kg is described as a 20 kg dog, not a 20-kg dog. If the unit symbol kg is replaced by the name unit name (kilogram) then we are back normal English text again, so it is OK to talk about a 20-kilogram dog, but not a 20 kg dog.
The gov.uk website is seriously wrong and obviously written by someone with understanding of the SI system.