Project

PSWriteHTML

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

Stars 1,019
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.41.0
Language: PowerShell Updated: 2026-10-03
Command

New-HTMLHeading

Module PSWriteHTML

Creates a new HTML heading with customizable options.

Syntax

New-HTMLHeading [[-Color] <String>] [[-Heading] <String>] [[-HeadingText] <String>] [-Underline] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function generates an HTML heading based on the provided parameters such as heading level, text content, underline option, and color.

Examples

Authored help example

EXAMPLE 1

New-HTMLHeading -Heading 'h1' -HeadingText 'Main Title' -Underline -Color 'blue'
Generates an HTML heading of level h1 with the text 'Main Title', underlined, and in blue color.

EXAMPLE 2

New-HTMLHeading -Heading 'h3' -HeadingText 'Sub Title' -Color 'green'
Generates an HTML heading of level h3 with the text 'Sub Title' in green color.

Parameters

-Color String optionalposition: 2
The color of the heading text.
-Heading String optionalposition: 0
Specifies the level of the heading. Valid values are 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'.
Possible values: h1, h2, h3, h4, h5, h6
-HeadingText String optionalposition: 1aliases: Text
The text content to display within the heading.
-Underline SwitchParameter optional
Indicates whether the heading should be underlined.

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.