Question: <http://goo.gl/yB6ST>

On this page I list all the galleries on left. I want to add "name" attribute in every link so if you click any item in the menu I can force it to be at the top on a new page. For example, lets say you clicked on "Chicago History Museum" when next page opens "Chicago History Museum" should be at the top, that's what I am trying to accomplish.

Answer: 
Its possible with WordPress menu.
First of all I believe that you added the WordPress menu (Not just html menu.)

Go through the following steps.

1. Login to admin dashboard.
2. Goto Appearance -> Menus from left side.
3. Open the menu and add "Title Attribute" next to navigation label.
![WordPress menu](https://i.stack.imgur.com/llf2s.jpg)
4. Save your menu. Thats All.

Hope this will helps you. Cheers !!!
You need to use the `walker_nav_menu_start_el` hook. Try something like this: 

```
function my_add_name_attr($link)
{
   // you can get the url and link text. 
   preg_match("/.*?href=\"?'?(.*?)\"?'?>(.*?)</",$link,$m);
   $url=$m[1]; 
   $link_text=$m[2];

   //can be created from the url and link text;
   $name_attribute="my_name_attribute";

    return strstr($link,"href",true)." name=$name_attribute ".strstr($link,"href");
}
add_filter("walker_nav_menu_start_el","my_add_name_attr");

```

See if this would help:

* [wp nav menu: add attributes to menu items](https://wordpress.stackexchange.com/q/103345)
* [Add custom attributes to menu items without plugin](https://wordpress.stackexchange.com/q/100726)

[WordPress Answers](http://wordpress.stackexchange.com) is a better place for asking WordPress related questions, you will get quicker and better responses.