change the elements in the wp menu

how can I change the element structure of the menu in wordpress themes? like I want to change the structure into this:

<nav id="mymenu" class="menu"> <!-- here the li tags with links --></nav>

just want to replace the UL tags with the nav tags which is html5. Thanks.

Related posts

Leave a Reply

2 comments

  1. It’s worth noting that you wouldn’t want to use <li></li> elements outside of a <ul> or <ol> element – it’s not valid HTML. What you probably want to do is wrap the list in a nav tag.

    I’m assuming, since you’re asking this question, that you’re using WP’s auto-generated menu? You can change a bunch of variables – check the WordPress Codex (always): http://codex.wordpress.org/Function_Reference/wp_nav_menu