To close a tab, add onclick="this.parentElement.style.display='none'" to an element inside the tab container.
Tip: The w3-button class can be used to style the close button (x):
London is the capital city of England.
Paris is the capital of France.
Tokyo is the capital of Japan.