“Hyper Text Markup Language (HTML) are sets of markup symbols or codes which is used to define the contents of a webpage and they can be utilised to extent labelling in QGIS”
HTML can be used in QGIS for rendering complex labels thereby enhancing what the labelling engine in QGIS provides. HTML labels can be accessed in QGIS map composer and also used for tooltips.
In this module, we will explore how HTML can be used to generate complex and beautiful labels in the map composer.
Goal: To learn how to use HTML and functions to label map elements
Title
text.HTML label
expression to highlight the label in different text and colour.Render as HTML
.To Do
Title
text. Hint Follow the example expression Effects
expression
Name | Expectation |
---|---|
Title ❗ |
Map showing provincial areas within South Africa |
HTML label ❗ |
|
Effects ❗ |
|
QGIS has an advanced labelling engine which can use expressions, data defined properties to make complex label rules. Labelling features have more options as opposed to mapping labels in map composer. Each composer label has its properties which can be customised but the customisation affects the whole label. In some cases, users want to fine-tune the label by separating it based to highlight specific text and the HTML labelling allows us to achieve this effect. Rendering labels as HTML allow for nice cartographic visualisation and add more options to the QGIS labelling engine. One useful scenario for rendering labels as HTML is when you want to create a composite label that contains different types of text sizes and colours.
Which of the following statement is incorrect:❗
HTML labels can be used when your map consists of vector layer only :❗
Download the sample data for the lesson.
This lesson was funded by Kartoza