Skip to content

w8tcha/HtmlProperties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HtmlProperties

Constants for Html Attributes and Tag Names.

NuGet License: MIT

Instead of writing all the html tag names and/or attributes like this...

 // Create tag builder
 var builder = new TagBuilder(HtmlTag.Img)
 {
     TagRenderMode = TagRenderMode.SelfClosing
 };

 // Add attributes
 builder.MergeAttribute(HtmlAttribute.Src, "https://test.com/test.jpg");
 builder.MergeAttribute(HtmlAttribute.Alt, "test image");

use the contants...

 // Create tag builder
 var builder = new TagBuilder("img")
 {
     TagRenderMode = TagRenderMode.SelfClosing
 };

 // Add attributes
 builder.MergeAttribute("src", "https://test.com/test.jpg");
 builder.MergeAttribute("alt", "test image");

About

Constants for Html Attributes and Tag Names.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages