---
title: ratingTemplate
framework: tvml
role: collectionGroup
path: tvml/ratingtemplate
---

# ratingTemplate

Displays a rating for an item.

## Overview

Overview Use the ratingTemplate element to display a rating for an item. The following figure shows the basic layout for a ratingTemplate page. The theme for the rating template defaults to the system preference.

Main Elements The following listing shows the main elements of the ratingTemplate element in TVML format. <document>     <ratingTemplate>         <title>…</title>         <ratingBadge></ratingBadge>     </ratingTemplate> </document> Element Descriptions Example The following listing shows the TVML for a ratingTemplate example. The example displays a title and a set of rating badge images, such as stars. The filled rating badge images indicate the current rating for that title. The value attribute indicates that the example title has an 80 percent favorable rating, or 4 of 5 stars. <document>     <ratingTemplate>         <title>WWDC Roadtrip</title>         <ratingBadge value="0.8"></ratingBadge>     </ratingTemplate> </document> The following figure shows the output for the above example:

## Topics

### Valid TVML Attributes

- [binding](tvml/binding.md)
- [layoutDirection](tvml/layoutdirection.md)
- [prototype](tvml/prototype.md)
- [theme](tvml/theme.md)

## See Also

### Full-Page Templates

- [alertTemplate](tvml/alerttemplate.md)
- [catalogTemplate](tvml/catalogtemplate.md)
- [compilationTemplate](tvml/compilationtemplate.md)
- [descriptiveAlertTemplate](tvml/descriptivealerttemplate.md)
- [divTemplate](tvml/divtemplate.md)
- [formTemplate](tvml/formtemplate.md)
- [listTemplate](tvml/listtemplate.md)
- [loadingTemplate](tvml/loadingtemplate.md)
- [mainTemplate](tvml/maintemplate.md)
- [menuBarTemplate](tvml/menubartemplate.md)
- [oneupTemplate](tvml/oneuptemplate.md)
- [paradeTemplate](tvml/paradetemplate.md)
- [productBundleTemplate](tvml/productbundletemplate.md)
- [productTemplate](tvml/producttemplate.md)
- [searchTemplate](tvml/searchtemplate.md)
