> For the complete documentation index, see [llms.txt](https://docs.nosto.com/ugc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nosto.com/ugc/guides/widgets-nextgen/styling-guides/how-to-add-a-title-sub-title-to-a-widget.md).

# How to add a title / subtitle to a widget

{% hint style="warning" %}
You are reading the **NextGen Documentation**

**NextGen widgets** are a new and improved way to display UGC content onsite.&#x20;

From September 23rd 2025, all new widgets created will be NextGen.

Please check your widget version on the **Widget List page** to see if it is a **Classic** or **NextGen** widget.

You can read the [Classic Widget Documentation](/ugc/guides/onsite-widgets.md) here.
{% endhint %}

## Overview

Nosto's UGC offers the ability to create advanced customizations to your widgets to match your brand needs.

In this guide, we are going explain how you can add a Title & Sub-Title directly to your widgets to ensure if a widget hides in your website because it doesn't have enough content to be displayed the entire header hides with it.

Please note that this customization is currently not supported for Story widgets.

## Getting Started

Both IDE and Custom Code Editor require one simple change to add a Title & Sub-Title to your widgets.

1. Go to your layout.hbs file (or Widget Layout in the Custom Code Editor) and add the following code to the top of your file:

```hbs
<div class="ugc-headline">
  <span class="ugc-title">Get Inspired!</span>
  <div class="ugc-widget-subtitle">See what others have to share about #mybrand</div>
</div>
```

2. Save your changes and publish the widget.
3. Go to your CSS file (or Widget CSS in the Custom Code Editor) and add the following code to style your Title & Sub-Title:

```css
.ugc-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.ugc-title {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  margin-bottom: 10px;
}
.ugc-widget-subtitle {
  font-size: 16px;
  color: #666;
}
```

4. Save your changes and publish the widget.
5. Your widget should now display a Title & Sub-Title at the top of the widget.

### Result

![](/files/mSnw1xeWoFU0q2EuKFOM)

```




```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nosto.com/ugc/guides/widgets-nextgen/styling-guides/how-to-add-a-title-sub-title-to-a-widget.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
