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-HTMLSectionStyle

Module PSWriteHTML

Creates a new HTML section style with customizable options.

Syntax

New-HTMLSectionStyle [-Align <String>] [-AlignContent <String>] [-AlignItems <stretch|flex-start|flex-end|center|baseline>] [-AlignItemsContent <stretch|flex-start|flex-end|center|baseline>] [-BackgroundColorContent <String>] [-BorderRadius <String>] [-Direction <row|row-reverse|column|column-reverse>] [-DirectionContent <row|row-reverse|column|column-reverse>] [-HeaderBackGroundColor <String>] [-HeaderRemovePadding] [-HeaderTextAlignment <center|left|right|justify>] [-HeaderTextColor <String>] [-Justify <flex-start|flex-end|center>] [-JustifyContent <flex-start|flex-end|center>] [-RemoveShadow] [-RequestConfiguration] [-Rotate <-180deg|-90deg|90deg|180deg>] [-TextOrientation <mixed|upright>] [-Wrap <wrap|nowrap|wrap-reverse>] [-WrapContent <wrap|nowrap|wrap-reverse>] [-WritingMode <vertical-rl|vertical-lr|horizontal-tb>] [<CommonParameters>]
#
Parameter set: Manual

Description

This function creates a new HTML section style with various styling options such as border radius, text color, alignment, background color, and more.

Examples

Authored help example

EXAMPLE 1

New-HTMLSectionStyle -BorderRadius '10px' -HeaderTextColor 'blue' -HeaderTextAlignment 'center' -HeaderBackGroundColor 'lightgray' -Wrap 'wrap' -Direction 'row' -Align 'center' -AlignItems 'flex-start' -Justify 'space-between' -Rotate '90deg' -BackgroundColorContent 'white' -WrapContent 'wrap' -DirectionContent 'column' -AlignContent 'flex-end' -AlignItemsContent 'center' -JustifyContent 'flex-start' -WritingMode 'horizontal-tb' -TextOrientation 'upright' -RequestConfiguration
Creates a new HTML section style with specified options.

Parameters

-Align String optional
Specifies the alignment of the section.
Possible values: flex-start, flex-end, center, space-between, space-around, stretch
-AlignContent String optional
Specifies the alignment of the section content.
Possible values: flex-start, flex-end, center, space-between, space-around, stretch
-AlignItems String optional
Specifies the alignment of the items within the section.
Possible values: stretch, flex-start, flex-end, center, baseline
-AlignItemsContent String optional
Specifies the alignment of the items within the section content.
Possible values: stretch, flex-start, flex-end, center, baseline
-BackgroundColorContent String optionalaliases: BackgroundShade
Specifies the background color of the section content.
-BorderRadius String optional
Specifies the border radius of the section.
Possible values: 0px, 5px, 10px, 15px, 20px, 25px
-Direction String optional
Specifies the direction of the section layout.
Possible values: row, row-reverse, column, column-reverse
-DirectionContent String optional
Specifies the direction of the section content layout.
Possible values: row, row-reverse, column, column-reverse
-HeaderBackGroundColor String optionalaliases: TextBackGroundColor
Specifies the background color of the section header.
-HeaderRemovePadding SwitchParameter optional
-HeaderTextAlignment String optionalaliases: TextAlignment
Specifies the text alignment of the section header.
Possible values: center, left, right, justify
-HeaderTextColor String optionalaliases: TextColor
Specifies the text color of the section header.
-Justify String optional
Specifies the justification of the section.
Possible values: flex-start, flex-end, center
-JustifyContent String optional
Specifies the justification of the section content.
Possible values: flex-start, flex-end, center
-RemoveShadow SwitchParameter optional
-RequestConfiguration SwitchParameter optional
Indicates whether to request configuration for the section styling.
-Rotate String optional
Specifies the rotation angle of the section.
Possible values: -180deg, -90deg, 90deg, 180deg
-TextOrientation String optional
Specifies the text orientation of the section.
Possible values: mixed, upright
-Wrap String optional
Specifies the wrapping behavior of the section.
Possible values: wrap, nowrap, wrap-reverse
-WrapContent String optional
Specifies the wrapping behavior of the section content.
Possible values: wrap, nowrap, wrap-reverse
-WritingMode String optional
Specifies the writing mode of the section.
Possible values: vertical-rl, vertical-lr, horizontal-tb

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.