The foregut (also called the stomodaeum) is the anterior portion of the gut that is lined with ectoderm.