I want to direct a visitor to a specific div in another html file,
This is how it goes in the same html:  <a href="#goTo"></a> but it doesnt work if the div is in another html. for example <a href="../index.html #goTo">This link should go to the div goTo in the index file </a>
            Asked
            
        
        
            Active
            
        
            Viewed 731 times
        
    1
            
            
         
    
    
        Azertit
        
- 102
- 9
- 
                    1index.html#goTo does thıs work? no space. – btevfik Mar 25 '15 at 12:15
3 Answers
0
            Remove the space in your link:
<a href="../index.html#goTo">This link should go to the div goTo in the index file</a>
0
            
            
        Try writing the anchor directly after the file name, without a space:
<a href="../index.html#goTo">This link should go to the div goTo in the index file </a>
If that doesn't work, check if the anchor really is named "goTo".
 
    
    
        Philex
        
- 37
- 5
 
    