> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/help/llms.txt)

# Customize label text for a single label

This tutorial will walk you through how to change country *Place Labels* in a custom style, using [expressions](https://docs.mapbox.com/style-spec/reference/expressions/) in the **Mapbox Studio style editor**.

Place labels mark different types of geographical entities on a map, such as *continents*, *countries*, and *cities*. [Expressions](https://docs.mapbox.com/style-spec/reference/expressions/) allow you to define a formula to adjust the value of a property. Using these features together, you can add custom label text for specific places, overriding or extending the default presentation of the place's name.

Using a custom style, you can make adjustments to these labels to help highlight each stop along this journey.

The final product of this tutorial will highlight which countries would be included on a hypothetical flight path, starting in Spain, moving to Portugal, then France and ending in Morocco.

## Prerequisites

To follow along with this guide you will need:

-   **Mapbox account**: [Sign up](https://account.mapbox.com/auth/signup/) for free or [log in](https://console.mapbox.com/) if you already have an account.

## Create a new style

First you will need to create a new style in Mapbox Studio.

A [style](https://docs.mapbox.com/help/glossary/style/) is a set of rules for how Mapbox will draw your map and its data on the page.

To create a style you will need to:

1.  Log into your Mapbox account and navigate to your [Styles page](https://console.mapbox.com/studio/), where all your styles are listed.
2.  Click the **New style** button.
3.  In the new menu that appears, select **Start from scratch**.
4.  Click the **Customize** button.

The Mapbox Studio editor will open up with a new blank style which you will customize in the next steps.

Your browser doesn't support HTML5 video. Open [link to the video](https://docs.mapbox.com/help/help/assets/medias/tutorials--custom-label-text--create-a-style-2cb7beaaa9d1aa6859f05ac529316131.mp4).

> **Note: Learn more about styles**
> 
> A style defines how all your data should be styled and includes references to your data and map images (icons, markers, patterns), fonts. For more about styles, see the [Styles](https://docs.mapbox.com/studio-manual/reference/styles/) section of the Mapbox Studio Manual.

## Create a base style

Because you have created your own style from scratch, you will need to build out a base style to work off of.

To customize your style, follow these steps:

1.  Click the blue `+` button in the top left corner of the editor.
2.  In the menu that appears, click **Components** > **Land & Water**.
3.  In the Land & Water menu, click Base and set the color.l, you w

-   For this tutorial you can use the color value: `#72d4fe`

4.  Next, click the Global tab.
5.  Select **Projection** and click on **Projection Name** dropdown.
6.  Select **Mercator**.

Now you will have a monochrome style that you can build off of.

> **Note (warning): Troubleshooting**
> 
> If you do not see the `Components` option, you will need to make a new style. Make sure when creating a style, you select **Start from Scratch** instead of the default options.

Your browser doesn't support HTML5 video. Open [link to the video](https://docs.mapbox.com/help/help/assets/medias/tutorials--custom-text-label--customize-basemap-b6665825c3584a5234d9b9b65b38fffb.mp4).

## Adjust Place labels component

The **Mapbox Studio style editor** is a visual tool for creating custom map styles, for example adjusting place label components.

Now that you have a basemap, you can add the country labels:

1.  Select the **Layers** tab.
2.  Click the blue `+` button.
3.  Select **Components** > **Place labels**.
4.  Toggle off the *Continents*, *States/Provinces*, *Settlements*, and *Settlement subdivisions* properties.

Now with these adjustments, you should see country labels on the globe.

Your browser doesn't support HTML5 video. Open [link to the video](https://docs.mapbox.com/help/help/assets/medias/tutorials--custom-text-label--placel-labels-c00421d49818eec4df377f9523ce2584.mp4).

## Use expressions to edit specific labels within a layer

You can customize the labels that appear on the map based on conditions and properties within the data by using expressions.

[Expressions](https://docs.mapbox.com/style-spec/reference/expressions/) define formulas that allow you to compute the value of a property. There are many types of expression operators, but you will be using a **Data Operator** to change the value of a country label based on your provided data:

1.  Click on the **Place Label** layer and select **country-label** to see all the options available to style in this layer.
2.  Towards the bottom of the menu that appears, select **Style with data conditions**.
3.  Type `name_en` and select it from the list that appears
    -   This will allow you to style the label based on the English name for the country.
4.  In the new **Data Field** panel that appears, type in `France` and click `+ use France` at the bottom of the prompt.
    -   This is the country label you will be customizing.
5.  Next in the input field that contain, `coalesce`, click before the item and type `"Land in: "`.
    -   You will see an error on the input, this is expected and will be fixed when you combine the strings in the next step.
6.  Next you will need to combine the strings, by clicking on **&**.
7.  Lastly save your work by clicking **Done** in the bottom right hand corner of the panel

Now if you pan over to France, you will see the `France` label change to `Land in: France` on your map.

Your browser doesn't support HTML5 video. Open [link to the video](https://docs.mapbox.com/help/help/assets/medias/tutorials--custom-label-text--france-stop-b902e97ed847a3a696be5dd465047dfd.mp4).

## Adding additional data conditions

Now that you have customized the label for France using expressions, you will repeat this for each of the other countries.

1.  To edit another data condition, click **Add another condition**.
2.  This time, continue the travel journey by choosing the first stop on the trip.
    -   In the first text field, enter `Spain` and then `"First stop: "` in the `Text field` box.
3.  Repeat the previous step to continue to add more data conditions and stops on the trip.
    -   Portugal should be changed to "Second stop: Portugal"
    -   Morocco should be change to "Last stop: Morocco".

Once you are finished your map will look something like the one below.

## Final product

You've updated your map using expressions to display custom labels for specific labels.

## Next steps

To learn more about using the Mapbox Studio style editor, read the [Mapbox Studio Manual](https://docs.mapbox.com/studio-manual/).