added code for all type and patterns, and also for most default elements, except for forms