In botany, a cortex is an outer layer of a stem or root in a vascular plant, lying below the epidermis but outside of the vascular bundles. The cortex is composed mostly of large thin-walled parenchyma cells of the ground tissue system and shows little to no structural differentiation. The outer cortical cells often acquire irregularly thickened cell walls, and are called collenchyma cells.

Plants

Stems and branches 
In the three dimensional structure of herbaceous stems, the epidermis, cortex and vascular cambium form concentric cylinders around the inner cylindrical core of pith. Some of the outer cortical cells may contain chloroplasts, giving them a green color. They can therefore produce simple carbohydrates through photosynthesis.   

In woody plants, the cortex is located between the periderm (bark) and the vascular tissue (phloem, in particular). It is responsible for the transportation of materials into the central cylinder of the root through diffusion and may also be used for storage of food in the form of starch.

Roots 
In the roots of vascular plants, the cortex occupies a larger portion of the organ's volume than in herbaceous stems. The loosely packed cells of root cortex allow movement of water and oxygen in the intercellular spaces. 

One of the main functions of the root cortex is to serve as a storage area for reserve foods. The innermost layer of the cortex in the roots of vascular plants is the endodermis. The endodermis is responsible for storing starch as well as regulating the transport of water, ions and plant hormones.

Lichen 
On a lichen, the cortex is also the surface layer or "skin" of the nonfruiting part of the body of some lichens. It is the "skin", or outer layer of thallus tissue, that covers the undifferentiated cells of the medulla. Fruticose lichens have one cortex encircling the branches, even flattened, leaf-like forms; foliose lichens have different upper and lower cortices; crustose, placodioid, and squamulose lichens have an upper cortex but no lower cortex; and leprose lichens lack any cortex.

See also
Bast
Pericycle

References

Plant anatomy
Plant physiology