how to add li and a classes and id to the nav menu with code?

I have registered nav menu. here is the code

<?php 
                    wp_nav_menu(
                            array (
                                    'theme_location' => 'top-menu',
                                    'menu_id' => 'navbarSupportedContent',
                                    'menu_class' => 'navbar-nav ml-auto',
                                    'container' => 'ul',
                                
                            )
                );  ?>

but li and a have classes that are not applied to the nav menu wordpress code. so how to add them?

<li id="f-one" class="nav-item"><a class="nav-link" href="#home">Home</a></li>

so any of f-one id or nav-item, nav-link added to the wordpress nav menu style. how to add them please?

Go to Source
Author: social