I am new to Wordpress. I am converting html site to wordpress site and have added webpage content in the wordpress text editor. Everything is fine, but i have a link in that webpage which redirects to home page, i.e anchor tag with reference to index.html. So after adding that page to wordpress in text editor, i have changed it to "http://localhost/sitename/" which links to home page.
My question is, how to remove localhost and yet link it to homepage. I tried php home_url(); inside anchor tag but didn't work.

<a href="/">Home</a>?/sitename/index.html, or just/sitename/, if you have the auto-index feature :) You don't have to writehttp://localhostexplicitly (no need in absolute URLs on your own site). Well, there isget_home_url()function. In a PHP script you can do something like<a href="<?php echo get_home_url(); ?>">Home</a>