# New-HTMLList

Creates an HTML list with customizable styling options.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates an HTML list with customizable styling options.

## Syntax

```
New-HTMLList
[-Alignment <left|center|right|justify>]
[-BackGroundColor <String>]
[-Color <String>]
[-Direction <rtl>]
[-FontFamily <String>]
[-FontSize <Object>]
[-FontStyle <normal|italic|oblique>]
[-FontVariant <normal|small-caps>]
[-FontWeight <String>]
[-LineBreak]
[[-ListItems] <ScriptBlock>]
[-Reversed]
[-TextDecoration <line-through|overline|underline>]
[-TextTransform <uppercase|lowercase|capitalize>]
[-Type <Unordered|Ordered>]
[<CommonParameters>]
```

[#](#method-new-htmllist-string-string-string-string-string-object-string-string-string-switchparameter-scriptblock-switchparameter-string-string-string)

Parameter set: `All Parameter Sets`

## Description

The New-HTMLList function generates an HTML list with various styling options such as color, font size, font weight, alignment, and more.

## Examples

### Example 1

```powershell
New-HTMLList -ListItems { 'Item 1', 'Item 2', 'Item 3' } -Type Unordered -Color 'blue' -FontSize 12 -FontWeight 'bold' -Alignment 'center'
```

Creates an unordered HTML list with three items ('Item 1', 'Item 2', 'Item 3') displayed in blue color, font size 12, bold font weight, and centered alignment.

### Example 2

```powershell
New-HTMLList -ListItems { 'Apple', 'Banana', 'Cherry' } -Type Ordered -FontFamily 'Arial' -TextDecoration 'underline' -Direction 'rtl'
```

Creates an ordered HTML list with three items ('Apple', 'Banana', 'Cherry') using Arial font family, underlined text decoration, and right-to-left text direction.

## Parameters

**-Alignment String optional**

Specifies the alignment of the text within the list. Valid values are 'left', 'center', 'right', and 'justify'.

Possible values: `left`, `center`, `right`, `justify`

**-BackGroundColor String optional**

Specifies the background color of the list.

**-Color String optional**

Specifies the color of the text in the list.

**-Direction String optional**

Specifies the direction of the text. Valid value is 'rtl' (right-to-left).

Possible values: `rtl`

**-FontFamily String optional**

Specifies the font family for the text in the list.

**-FontSize Object optional**

Specifies the font size of the text in the list.

**-FontStyle String optional**

Specifies the style of the font. Valid values are 'normal', 'italic', and 'oblique'.

Possible values: `normal`, `italic`, `oblique`

**-FontVariant String optional**

Specifies the variant of the font. Valid values are 'normal' and 'small-caps'.

Possible values: `normal`, `small-caps`

**-FontWeight String optional**

Specifies the weight of the font. Valid values include 'normal', 'bold', 'bolder', 'lighter', and numeric values from 100 to 900.

Possible values: `normal`, `bold`, `bolder`, `lighter`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`

**-LineBreak SwitchParameter optional**

Indicates whether to include line breaks between list items.

**-ListItems ScriptBlock optionalposition: 0**

Specifies the list items to be included in the HTML list.

**-Reversed SwitchParameter optional**

Indicates whether the list should be displayed in reverse order.

**-TextDecoration String optional**

Specifies the decoration of the text. Valid values are 'none', 'line-through', 'overline', and 'underline'.

Possible values: `line-through`, `overline`, `underline`

**-TextTransform String optional**

Specifies the transformation of the text. Valid values are 'uppercase', 'lowercase', and 'capitalize'.

Possible values: `uppercase`, `lowercase`, `capitalize`

**-Type String optional**

Specifies the type of list to create. Valid values are 'Unordered' (default) and 'Ordered'.

Possible values: `Unordered`, `Ordered`

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:51014B22F0AE32536931B0904CAB10F5F0D4601A0A519C8B8F96FB099E7E613E -->
