'How to link to specify section of a HTML page as: <div id="here"></div>?

I have an UL and I need to link those images to the right section of projects.php: EG:ProjectA.jpg to link >> projects.php <section id="projectA"</section>

<ul>
  <li>
    <a title="View project" href="projects.php">
      <img alt="" src="ProjectA.jpg" />
      <figcaption>BLABLA</figcaption>
    </a>
  </li>
  <li>
    <a title="View project" href="projects.php">
      <img alt="" src=".jpg" />
      <figcaption>BLABLA</figcaption>
    </a>
  </li>
</ul>
<!--end ul-->


Solution 1:[1]

To link like you want, simply add #sectionname to your anchor href. So in your example:

<a title="View project" href="projects.php#projectA"> 
    <img alt="" src="ProjectA.jpg"/>
    <figcaption>BLABLA</figcaption> 
</a>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matt Ellen