AngularJS Example

HTML

<style>
    table { border: 1px solid black;}
    td { border: 1px solid black;}
</style>

<div ng-app="tables">
    <tbl>
        <cell>q1
          <cell>q2</cell>
        </cell>
        
        <cell>q3</cell>
    </tbl>
</div>

CSS

</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> 
<script type="text/javascript" src="https://code.angularjs.org/1.3.0-rc.0/angular.js"></script>

JavaScript

angular.module('tables',[])
    .directive('cell', function() {
        return {
            restrict: 'E',
            replace: true,
            transclude: true,
            template: '<tbody><td ng-transclude></td><td ng-transclude></td></tbody>'            
        }
    })
    .directive('tbl', function() {
        return {
            restrict: 'E',
            replace: true,
            transclude: true,
            template: '<table><tr ng-transclude></tr></table>'            
        }
    });