Labeling Features with Attributes
This tutorial demonstrates labeling features based on values within their layer’s attribute table.
Included in this tutorial:
Enabling labels
Labeling properties
Choosing which features are labeled with a filter
Other label options
Software version in examples: QGIS-LTR 3.40.5-Bratislava
Tutorial Data: The tutorial includes demonstration with sample data available here.
Credits: Sally Kaye and L. Meisterlin (2025)
Enable Labels
To access the labeling functions, right-click on the layer’s name in the Layers panel and click Show Labels.
accessing labels from layer name
Enabling Labels will generate labels for each feature, based on a default field in the attribute table (which may not be what you want).
Accessing Labeling Properties
Option 1: from the Layer Properties window
Labeling options are accessible from the Layer Properties window. Right-click on the layer name in the Layers Panel, click Properties, and click the Labels tab from the menu on the left of the Layer properties menu. This will bring up label options for the selected layer; you can use the dropdown menus to select the labeling method and attribute value to use for labels. You can also find label options described below.
accessing label properties from the layer name
Option 2: from the Label Toolbar
Labeling options are also found in the Layer Styling panel. One way to bring this up is by clicking the label icon (highlighted below) in the Label Toolbar.
accessing label properties from the Label Toolbar
Option 3: from the main menu
In the main menu, navigate through Layer > Labeling to pull up the Labels tab of the Layer Styling panel, where you will find the properties and options for labeling features based on attributes.
Using the dropdown menus, choose the layer to label, the labeling method, and the attribute value to display as labels.
In the example below, we access labeling options from the main menu. We use the basic Single Labels method and label features in the Points1_Table1_join layer based on their values in the “categ” field of the attribute table.
choosing an attribute field for label values
Choosing which Features are Labeled with a Filter
The Single Labels method demonstrated above applies labels to all features in the chosen layer. Alternatively, you may want to choose a specific group of features for labeling.
To control which features are labeled, change the labeling method from Single Labels to Rule-Based Labeling.
In the resulting table list of labels, double-click the relevant layer’s “rule” information to edit a rule or add a new rule if it is currently “(none).” This will summon the Edit Rule options.
In the Edit Rule options, use the options to construct a rule by which to filter the features that receive labels. You can type in the filter text box or use the expression builder. (In our demonstration, we use the expression builder to filter based on attribute values.)
Note that the other Rule options include Else options and labeling based on Scale Range (for legibility when your map is too zoomed out for comfortable reading of text labels).
In the demonstration below, we narrow the labeled features to those with a value greater than 0.9 in the “dec_a” field of the layer’s attribute table.
choosing which features to label based on a filter
Other Label Options
The demonstration below walks through the interface, highlighting where to find different labeling options. To name just a few of the options:
Text options: You can edit basic text symbols like typeface, size, and color in the first tab in the labeling panel. The second tab includes additional options for text formatting, such as spacing.
Graphic options: Other tabs display options for adding a buffer, mask, background, or drop shadow to the label. These can also help with legibility, depending on your map.
Placement options: Callouts can indicate which specific features are referenced by a label, with text appearing at a fixed offset from their corresponding feature (under the Callout tab). The Placement tab includes options to specify the location of labels relative to their corresponding features, regardless of whether callouts are used.
Other options: Lastly, the Rending tab includes additional options for how labels are rendered within the map, ranging from controlling resolution to how the software handles overlapping labels.
We also demonstrate turning off live update, requiring you to click Apply each time you’d like to apply a formatting change to the labels.
other options for formatting and customizing feature labels