Modern namespaced IDs are recommended. This numerical form is only for old Java releases.
/give @p 263 1
Give command syntax by version
Java 1.13+
/give @p minecraft:coal 1
Namespaced ID (current format)
Java 1.8–1.12.2
/give @p 263 1 0
Numerical ID + data value
Bedrock Edition
/give @p minecraft:coal 1
Same namespaced ID (namespace optional)
Rows appear only when the underlying value is verified: the Java 1.8–1.12.2 row requires a reviewed historical numerical ID, and the Bedrock row appears only when this exact namespaced ID exists in the Bedrock registry.
How to Get Coal
Crafting Recipe
Combine 1 block of coal in any arrangement on a crafting table — makes 9 × Coal.
More Ways to Get It
Coal mainly comes from mining coal ore with any pickaxe—each block drops 1 coal, or up to 4 with Fortune III. You can also smelt coal ore directly, uncraft a block of coal back into 9 pieces, collect it from chests in mineshafts and villages, or get it from wither skeletons.
Mine coal ore—common around Y=96 and in mountains—with any pickaxe.
Each block drops 1 coal; a Fortune-enchanted pickaxe raises the drop to as many as 4.
Uncraft a block of coal whenever you need 9 pieces back for fuel or torches.