<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
td.triangle {
position: relative;
width: 100px;
height: 100px;
background: green;
}
td.triangle div {
position: absolute;
right: 0;
top: 0;
width: 10px;
height: 10px;
background: red;
}
</style>
</head>
<body>
<table>
<tr>
<td class="triangle">
<div></div>
</td>
</tr>
</table>
</body>
</html>