How can I render a menu item as a span (or other elements) instead of a ? I'm using Drupal 7 with the Bootstrap base theme, and I'd like to create a second and third level of drop-down. I tried using the special_menu_links module but nothing happens. I also tried what suggested on https://www.drupal.org/node/143322, but that doesn't work either.

How can I render a menu item as a span (or other elements) instead of a &lt;a&gt;?
You can use Special menu items module.


  User can create a new menu item and place either  or
   to the Path field, without quotes.


Also, you can look at another handy module called Menu attributes which allowed you to have control over menu link attributes.

Both modules use hook_menu_alter to adjust the changes to the menu item, you can take look at the module's code to understand how it works exacitly if you are interested.