Creation of different cell types from an identical DNA sequence is a remarkable property of genomes and a fundamental question in biology. Cell type-specific gene expression is initiated by transcription factors and maintained by epigenetic mechanisms. Although epigenomes of many cell types in mammals have been sampled, how differences in epigenetic information between cells arise is not understood. We use the unique experimental advantages of the Drosophila embryo to identify how tissue-specific epigenetic patterns are established in vivo. Chromatin immunoprecipitation (ChIP) and precision nuclear run-on (PRO) experiments coupled to high throughput sequencing are combined with transgenic expression assays, reporter genes and gene replacement by homologous recombination. Our studies provide a link between the information for cell specification that is hard-wired in the DNA with epigenetic regulation. These in vivo experiments provide mechanisms for cell differentiation and formation of epigenetic landscapes that cannot be obtained by cell culture based or biochemical assays.