Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML/CSS. goto a class?

Tags:

html

css

in HTML you have the possibility, with the tag TOP, to go on the top on the page directly. For this reason I thought that maybe there is also the possibility to click a link in my webpage and goto directly to a specific class (only html/csss)... Is it possible or not?

like image 892
LUca Avatar asked Dec 02 '22 14:12

LUca


1 Answers

Not to a specific class, becuase there can be many elements with the same classname, but with an ID it's possible.

<!-- Somehwere on your page -->
<span id="boookmark1"></span>

<!-- Somewhere else on your page -->
<a href="#bookmark1">Go to bookmark1</a>
like image 51
I wrestled a bear once. Avatar answered Dec 29 '22 23:12

I wrestled a bear once.