Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
How to create links to sections on the same page (but different tab) in HTML

As the question says I want to make hypertext in my page which contains 4 tabs (R Markdown file knitted as HTML). I know this method works well within the same page that doesn't have different tabs but it didn't work with me.

Using the #id selector <p id="opening">Hyperlinks are utilized by a web browser to move from one page to another...</p>

Creating a link to the selector <a href="#opening">Take me to the opening paragraph.</a>

Can you please help me with that?

For example in the "home" tab I want a hypertext that directs the user to a specific section in "about us" tab

Thanks in advance

Btw, I am using HTML with R Markdown to knit the file.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is something that you can do. You can assign a width and height for your container, then overflow: auto. Each children has to have the same height and same width as the container, therefore, if you have several children, this will overflow.

What the hyperlink or tab does when you click, it scroll to view on the said children.

.container {
  width: 200px;
  height: 200px;
  overflow: auto;
}

.child {
  display: block;
  background: aliceblue;
  height: 200px;
}
<div class="container">
<div class="tabs">
<a href="#Tab-1">Tab-1</a>
<a href="#Tab-2">Tab-2</a>
<a href="#Tab-3">Tab-3</a>
</div>
<div id="Tab-1" class="child">
Tab 1
</div>
<div id="Tab-2" class="child">
Tab 2
</div>
<div id="Tab-3" class="child">
Tab 3
</div>
</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!