What is the difference between structural directive and attribute directive in Angular 7?

Structural directives are used to alter the DOM layout by removing and adding DOM elements. These directives are far better in changing the structure of the view. Examples of Structural directives are NgFor and Nglf.

Attribute Directives are used as characteristics of elements. For example, a directive such as built-in NgStyle in the template Syntax guide is an attribute directive.