Which cavity consists of the cranial cavity and vertebral canal? the dorsal or the ventral?

You will find the answer here:

http://en.wikipedia.org/wiki/Human_body_cavities

dorsal

The cavity that consists of both the cranial cavity and vertebral canal is the dorsal cavity. To understand this concept, let's break it down:

The vertebral canal is a long, hollow space that runs through the vertebrae of the vertebral column (spine). It houses the spinal cord and provides protection for it.

On the other hand, the cranial cavity is a space within the skull that houses the brain. It provides protection for the brain and its associated structures.

Both the vertebral canal and cranial cavity are located on the dorsal side of the body. The term "dorsal" refers to the back or posterior side of an organism.

In contrast, the ventral cavity is located on the ventral (belly or anterior) side of the body. It includes cavities such as the thoracic cavity (housing the heart and lungs) and the abdominopelvic cavity (housing the abdominal organs and reproductive organs).

So, to answer your question, the cavity that consists of the cranial cavity and vertebral canal is the dorsal cavity.