Horizontal Tabs: The following code demonstrates the simple HTML structure with tabs and its contents in the form of a paragraph. On click of each tab, it calls the displayContent() method implemented in the “script.js” file given below.
CSS Code: The following code is of the “style.css” file that is used for the styling of the page and the tabs.
Vertical Tabs: The tabs can be made vertical by changing the HTML structure and replacing the CSS stylesheet with a modified one used for the vertical tabs design. The following code demonstrates the vertical tabs.
CSS Code: The below code is the modified CSS code for the vertical tabs display.