Functions/Public/base.ps1
Function base { <# .SYNOPSIS Create a base title in an HTML document. .DESCRIPTION The <base> tag specifies the base URL/target for all relative URLs in a document. There can be at maximum one <base> element in a document, and it must be inside the <head> element. .EXAMPLE base .EXAMPLE base "woop1" -Class "class" .Notes Author: Stéphane van Gulick Current Version: 3.1 History: 2018.11.1; Stephanevg;Updated to version 3.1 2018.10.30;@ChristopheKumor;Updated to version 3.0 2018.05.11;@Stephanevg; fixed minor bugs 2018.05.09;@Stephanevg; Creation .LINK https://github.com/Stephanevg/PSHTML #> [Cmdletbinding()] Param( [Parameter(Mandatory = $true)] [String]$href, [ValidateSet("_self", "_blank", "_parent", "_top")] [String]$Target, [AllowEmptyString()] [AllowNull()] [String]$Class, [String]$Id, [Hashtable]$Attributes ) $tagname = "base" if(!($Target)){ $PSBoundParameters.Target = "_self" } Set-htmltag -TagName $tagName -Parameters $PSBoundParameters -TagType void } |