# New-HTMLHeading

Creates a new HTML heading with customizable 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 a new HTML heading with customizable options.

## Syntax

```
New-HTMLHeading
[[-Color] <String>]
[[-Heading] <String>]
[[-HeadingText] <String>]
[-Underline]
[<CommonParameters>]
```

[#](#method-new-htmlheading-string-string-string-switchparameter)

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

### Example 1

```powershell
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

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:56E3E3409C03056C64132420AFBB6215342C06B0119E0C466B75DC493A012623 -->
