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-->
<a href="projects.php#projectA">your link</a>
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>
精彩评论