JSFiddle - React, Tailwind, and code Playground

HTML

<body>
<table class="outer-table">
	<thead>
		<th>Heading 1</th>
	</thead>
	<tbody>
		<tr>
			<td>
				Content 1
			</td>
			<td>
				<table>
					<thead>
						<th>Heading 1.1</th>
						<th>Heading 1.2</th>
					</thead>
					<tbody>
						<tr>
							<td>
								Content 1.1
							</td>
							<td>
								Content 1.2
							</td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				Content 2
			</td>
			<td>
				<table>
					<thead>
						<th>Heading 2.1</th>
						<th>Heading 2.2</th>
					</thead>
					<tbody>
						<tr>
							<td>
								Content 2.1
							</td>
							<td>
								Content 2.2
							</td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
	</tbody>
</table>
</body>

CSS

.moved {
    margin-top: -25px;
}

JavaScript

function styleHeaders(){
		//Hide all except the first nested headers.
		$(".outer-table table").find("thead").not(":eq(0)").css('display', 'none');
		
		//Move first nested table header up.
		$(".outer-table table").find("thead:eq(0)").css('background-color', 'red');
        $(".outer-table").find("table:eq(0)").addClass('moved');
	}
	
	styleHeaders();