Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLListItem

Namespace PSWriteHTML

Creates a new HTML list item with customizable styling options.

Remarks

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

Examples

Authored help example

EXAMPLE 1


New-HTMLListItem -Text 'Item 1' -Color 'blue' -FontSize '12px' -FontWeight 'bold' -Alignment 'center'
Creates an HTML list item with the text 'Item 1' in blue color, font size of 12 pixels, bold font weight, and centered alignment.
        

EXAMPLE 2


New-HTMLListItem -Text 'Item 2' -FontFamily 'Arial' -TextDecoration 'underline' -Direction 'rtl'
Creates an HTML list item with the text 'Item 2' in Arial font family, underlined text decoration, and right-to-left direction.
        

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.

Syntax

New-HTMLListItem [-Alignment <left|center|right|justify>] [-BackGroundColor <String[]>] [-Color <String[]>] [-Direction <rtl>] [-FontFamily <String[]>] [-FontSize <Object[]>] [-FontStyle <normal|italic|oblique>] [-FontVariant <normal|small-caps>] [-FontWeight <normal>] [-LineBreak] [-NestedListItems <ScriptBlock>] [-Text <String[]>] [-TextDecoration <line-through|overline|underline>] [-TextTransform <uppercase|lowercase|capitalize>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Alignment String[] optionalposition: namedpipeline: Falsevalues: 4
Specifies the alignment of the text within the list item. Valid values are 'left', 'center', 'right', and 'justify'.
Possible values: left, center, right, justify
BackGroundColor String[] optionalposition: 3pipeline: False
Specifies the background color of the list item.
Color String[] optionalposition: 2pipeline: False
Specifies the color of the text in the list item.
Direction String[] optionalposition: namedpipeline: Falsevalues: 1
Specifies the direction of the text. Valid value is 'rtl' (right-to-left).
Possible values: rtl
FontFamily String[] optionalposition: namedpipeline: False
Specifies the font family for the text in the list item.
FontSize Object[] optionalposition: namedpipeline: False
Specifies the font size of the text in the list item.
FontStyle String[] optionalposition: namedpipeline: Falsevalues: 3
Specifies the style of the font. Valid values are 'normal', 'italic', and 'oblique'.
Possible values: normal, italic, oblique
FontVariant String[] optionalposition: namedpipeline: Falsevalues: 2
Specifies the variant of the font. Valid values are 'normal' and 'small-caps'.
Possible values: normal, small-caps
FontWeight String[] optionalposition: namedpipeline: Falsevalues: 13
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 optionalposition: namedpipeline: False
Indicates whether to include a line break after the list item.
NestedListItems ScriptBlock optionalposition: 0pipeline: False
Specifies the nested list items to be included within the current list item.
Text String[] optionalposition: 1pipeline: False
Specifies the text content of the list item.
TextDecoration String[] optionalposition: namedpipeline: Falsevalues: 3
Specifies the decoration of the text. Valid values are 'none', 'line-through', 'overline', and 'underline'.
Possible values: line-through, overline, underline
TextTransform String[] optionalposition: namedpipeline: Falsevalues: 3
Specifies the transformation of the text. Valid values are 'uppercase', 'lowercase', and 'capitalize'.
Possible values: uppercase, lowercase, capitalize