how to set default font size for HTML field on catalog variable?

Aryan
Tera Contributor

how to set default font size for HTML field on catalog variable?

 

Aryan_0-1715756079059.png

 

10 REPLIES 10

Abhishek Kathe
Mega Guru

To set a default font size for an HTML field on a catalog variable in ServiceNow, you can use CSS styling within the variable form. Follow these steps:

1. Navigate to the variable form where you want to set the default font size for the HTML field.

2. Click on the variable that contains the HTML field.

3. In the Variable Attributes section, click on the Advanced view to reveal the HTML field.

4. In the HTML field, enter the following code snippet to set the default font size:
```html
<style>
.html-field {
font-size: 14px; /* Set your desired font size here */
}
</style>
```

5. Save the changes to the variable.

Now, when users access the catalog item and fill out the variable form, the HTML field will display with the default font size specified in the CSS styling.