Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 59161

HTML (Hyper Text Markup Language) is the standard content markup language of the web. It is an open standard developed and maintained by W3C (World Wide Web Consortium).

10 votes
2 answers
216 views

Html rendering framework with dynamics

} public Dictionary<string, MarkupFormattingOptions> Tags { get; set; } public HashSet<string> GlobalAttributes { get; set; } public int IndentWidth { get; set; } // Creates a Html … public static MarkupSchema Html => new MarkupSchema { Tags = { ["body"] = MarkupFormattingOptions.PlaceClosingTagOnNewLine, ["br"] = MarkupFormattingOptions.IsVoid …
t3chb0t's user avatar
  • 44.3k
2 votes
1 answer
591 views

TagHelper for class inlining

I'm building a RESTful service that sends emails with body rendered by partial views. It replaces my old solution that used hardcoded templates of IHtmlElement inside each application. One of its feat …
t3chb0t's user avatar
  • 44.3k
5 votes
2 answers
787 views

Visit each HTML element and apply inline CSS

= MarkupElement.Builder; [TestMethod] public void Visit_WithStyles_Applied() { var html = Html .Element("p", p => p .Append("foo ") .Element … = styleVisitor.Visit(html); Assert.AreEqual(@"<p>foo <span class=""qux"" style=""font-family: sans-serif;"">bar</span> baz</p>", html.ToHtml()); } } Before I write more complex html and …
t3chb0t's user avatar
  • 44.3k
4 votes
1 answer
555 views

Functional Html builder

This is my third attempt to create a easy to use html builder because I wasn't really satisfied with the first one that wasn't extendable at all and even the one using dynamics wasn't much better. … this, value) : @this; } } public static class FunctionalExtensions { public static T Tee<T>(this T @this, Action<T> tee) { tee(@this); return @this; } } Example var html
t3chb0t's user avatar
  • 44.3k
7 votes
1 answer
176 views

HTML-rendering framework for emails

Sometimes I need to auto-generate html-emails. To make this task a little bit easier I created a simple framework that takes care of rendering HTML. … It stores general data about an HTML element and can render it to HTML. …
t3chb0t's user avatar
  • 44.3k
3 votes
1 answer
1k views

Using simple HTML template to create HTML formatting rules

One of my tools that renders HTML needs some rules about document formatting. The renderer can format the output so that it is indented and contains appropriate line-breaks. … For the sake of this question let's assume the HTML is always valid. …
t3chb0t's user avatar
  • 44.3k