How give parent in navigation-structure the active tag
How a look at the isAncestorOf() method in the Docs. The given example code probably covers all you need:

{% set expanded = entry is defined and page.isAncestorOf(entry) %}
&lt;li{% if expanded %} class="expanded"{% endif %}&gt;


To only address the direct parent, use isParentOf() instead.