The HTMLPlusPlus namespace contains all HTML tags, while HTMLPlusPlus.Attribute contains all attributes. These classes provide the building blocks for a web page - they can be nested to form a tree and then any part of it can be rendered recursively with Render().

Examples

CopyC#
var page = new HTML { new P { "Hello, World!" } };

webBrowser1.DocumentText = page.Render();

Classes

  ClassDescription
Public classA

The anchor element, as in <a href=...>.

The default constructor requires a string, which will become the href attribute. You can then add any element, like Text, which will be the visible text of the link.

Public classBlockElement
This is an abstract class for all block elements.
Public classBody
The body tag.
Public classBr
The line break tag.
Public classDd
The dd (definition description) tag.
Public classDiv
The div tag.
Public classDl
The dl (definition list) tag.
Public classDocument

This class represents the root document.

It's purpose is mainly to allow DOCTYPE to be set.

Public classDt
The dt (definition term) tag.
Public classEm
The em (emphasis) tag.
Public classFlowElement
This is an abstract class for all flow elements.
Public classH
These are the heading tags. You can specify the level of the heading in the constructor.
Public classHead

The head tag.

Public classHr
The horizontal rule tag.
Public classHTML
The <html> tag. All elements are added under this tag. It will automatically determine where an element needs to be placed (head or body), depending on the child element's type.
Public classImg
The image tag.
Public classInlineElement
An abstact class for all inline elements.
Public classLi
The li (list item) tag.
Public classLink

The link (external resource) tag.

There are static properties that return common attributes, such as MimeType.TextJavascript or Rel.Stylesheet.

Public classOl
The ol (ordered list) tag.
Public classP
The paragraph tag.
Public classPre
The preformatted text tag.
Public classSpan
The span tag.
Public classStrong
The strong (bolded text) tag.
Public classStyle
The style tag. Please look at the remarks.
Public classTable
The table tag.
Public classTag

This is the abstract base of all HTML elements.

We implement the IEnumerable<(Of <(<'T>)>)> interface, so elements can be added with collection initializers and enumerated over.

Concrete implementations should override ToString() and implement Add() if appropriate.

Public classTd
The table cell tag.
Protected classText
This is a text literal.
Public classTh
The table heading tag.
Public classTitle
The page title tag.
Public classTr
The table row tag.
Public classUl
The ul (unordered list) tag.