create directive elements for html templates