Utility function to build individual HTML tags from CSS selectors.