Once an element's presence is confirmed qualitatively, its percentage BY WEIGHT is found by a dedicated quantitative method. Oxygen alone has no direct method -- its percentage is always found by DIFFERENCE (100% minus every other measured element).
Carbon and hydrogen are estimated together by combustion: a known weight w of sample is burnt completely in excess oxygen, and the masses of water (x g) and CO2 (y g) formed are weighed via an absorption train (conc. H2SO4-soaked pumice for water, then KOH bulbs for CO2). Since 18 g H2O contains 2 g H, %H=182×wx×100; since 44 g CO2 contains 12 g C, %C=4412×wy×100.
Sulphur (Carius method): the sample is heated with fuming HNO3 in a sealed tube, oxidising S to H2SO4, which is precipitated with excess BaCl2 as BaSO4 (mass x from sample mass w). Since 233 g BaSO4 contains 32 g S, %S=23332×wx×100.
Halogens (Carius method): heated with fuming HNO3 + AgNO3; the halogen precipitates directly as AgX. %Cl=143.535.5×wa×100; %Br=18880×wb×100; %I=235127×wc×100 (a/b/c = mass of AgCl/AgBr/AgI).
Phosphorus (Carius method): P oxidises to phosphoric acid, precipitated either as ammonium phosphomolybdate, (NH4)3PO4⋅12MoO3 (1877 g/mol; %P=187731×wx×100), or, after igniting a magnesium-ammonium phosphate precipitate, as magnesium pyrophosphate, Mg2P2O7 (222 g/mol; %P=22262×wy×100). …