Trimethylation of histone H3 at lysine 27 (H3K27me3) is a chromatin mark associated with Polycomb-mediated gene repression. Despite its critical role in development, it remains largely unclear how this mark is targeted to defined loci in mammalian cells. Here, we use iterative genome editing to identify small DNA sequences capable of autonomously recruiting Polycomb. We inserted 28 DNA elements at a defined chromosomal position in mouse embryonic stem cells and assessed their ability to promote H3K27me3 deposition. Combined with deletion analysis, we identified DNA elements as short as 220 nucleotides that correctly recapitulate endogenous H3K27me3 patterns. Functional Polycomb recruiter sequences are invariably CpG-rich but require protection against DNA methylation. Alternatively, their activity can be blocked by placement of an active promoter-enhancer pair in cis. Taken together, these data support the model whereby PRC2 recruitment at specific targets in mammals is positively regulated by local CpG density yet obstructed by transcriptional activity or DNA methylation.