Styles¶
Styles render, or make available, geospatial data. Styles for GeoServer are written in Styled Layer Descriptor (SLD), a subset of XML. Please see the section on Styling for more information on working with styles.
On the Styles page, you can register or create a new style, edit an existing style, or delete remove a style.

Styles page
Edit Styles¶
The Style Editor page presents options for configuring a style’s name and code. SLD names are specified at the top in the name field. Typing or pasting of SLD code can be done in one of two modes. The first mode is an embedded EditArea a rich editor. The second mode is an unformatted text editor. Check the Toggle Editor to switch between modes.

Rich text editor

Plain text editor
The rich editor is designed for text formatting, search and replace, line numbering, and real-time syntax highlighting. You can also switch view to full-screen mode for a larger editing area.
Button | Description |
![]() |
search |
![]() |
go to line |
![]() |
fullscreen mode |
![]() |
undo |
![]() |
redo |
![]() |
toggle syntax highlight on/off |
![]() |
reset highlight (if desynchronized from text) |
![]() |
about |
To confirm that the SLD code is fully compliant with the SLD schema, click the Validate button. A message box will confirm whether the style contains validation errors.
Note
GeoServer will sometimes render styles that fail validation, but this is not recommended.

No validation errors

Validation error message
Add a Style¶
The buttons for adding and removing a style can be found at the top of the Styles page.

Adding or removing a style
To add a new layer group, select the Add a new style button. You will be redirected to an editor page. Enter a name for the style. The editor page provides two options for submitting an SLD. You can paste the SLD directly into the editor, or you can select and upload a local file that contains the SLD.

Uploading an SLD file from your local computer
Once a style is successfully submitted, you will be redirected to the main Styles page where the new style will be listed.
Remove a Style¶
To remove a style, select the check box next to the style. Multiple layer groups can be selected for batch removal. Click the Remove selected style(s) link at the top of the page. You will be asked to confirm or cancel the deletion. Clicking OK removes the layer group.

Confirmation prompt for removing styles