URL Link with Query and ID Anchor

#html

I wanted to have a query in the url string while also scrolling down to an anchored element

the ? query must come before the # anchor

https://www.mydomain.com/admin?search=cars#header-2

Credits