ko.applyBindings({colors: ['red', 'yellow', 'green']});
<!DOCTYPE html> <html ng-app> <head> <title>Rowspan Demo</title> </head> <body> <table border="1"> <tbody data-bind="foreach: colors"> <tr> <!-- ko if: $index() == 0 --> <td data-bind="attr:{rowspan : $parent.colors.length}">Colors</td> <!-- /ko --> <td data-bind="text: $data"></td> </tr> </tbody> </table> </body> </html>