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

Namespace PSWriteHTML

Creates a new HTML container element with customizable options.

Remarks

This function creates a new HTML container element with the specified options such as content, width, margin, and anchor name.

Examples

Authored help example

EXAMPLE 1


New-HTMLContainer -HTML {
    // HTML content here
} -Width '50%' -Margin '10px' -AnchorName 'myAnchor'
        

Creates a new HTML container with custom HTML content, width of 50%, margin of 10px, and anchor name 'myAnchor'.

EXAMPLE 2


New-HTMLContainer -HTML {
    // More HTML content
}
        

Creates a new HTML container with additional HTML content and default width and margin.

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-HTMLContainer [-AnchorName <String>] [-Density <Spacious|Comfortable|Compact|Dense|VeryDense>] [-HTML <ScriptBlock>] [-Margin <String>] [-Width <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AnchorName String optionalposition: namedpipeline: False
Specifies the anchor name for the container. If not provided, a random anchor name will be generated.
Density String optionalposition: namedpipeline: Falsevalues: 5
Specifies the density of the panel. This will automatically enable responsive wrapping for the panel. The options are: Spacious, Comfortable, Compact, Dense, VeryDense.
Possible values: Spacious, Comfortable, Compact, Dense, VeryDense
HTML ScriptBlock optionalposition: 0pipeline: Falsealiases: Content
Specifies the content to be placed inside the container as a ScriptBlock.
Margin String optionalposition: namedpipeline: False
Specifies the margin of the container.
Width Object optionalposition: namedpipeline: False
Specifies the width of the container. Default is '100%'.