This is the official manual for the latest Org-mode release.
Live code blocks can be specified with a ‘src’ block or inline.1 The structure of a ‘src’ block is
#+NAME: <name> #+BEGIN_SRC <language> <switches> <header arguments> <body> #+END_SRC
The #+NAME:
line is optional, and can be used to name the code
block. Live code blocks require that a language be specified on the
#+BEGIN_SRC
line. Switches and header arguments are optional.
Live code blocks can also be specified inline using
src_<language>{<body>}
or
src_<language>[<header arguments>]{<body>}
<#+NAME: name>
#+NAME: Name
lines that can be used to name tables in Org mode
files. Referencing the name of a code block makes it possible to evaluate
the block from other places in the file, from other files, or from Org mode
table formulas (see The spreadsheet). Names are assumed to be unique
and the behavior of Org mode when two or more blocks share the same name is
undefined.
<language>
<switches>
<header arguments>
source code, header arguments
<body>