ASP.net HTML5 Generate Article Tag

ASP.net HTML5 Generate Article Tag ASP.net Generate HTML5 Article Tag.

HTML5 has come up with new tags. Here we will see how to generate Article tag of HTML5 using Asp.net. Some tags has been supported by modern browsers. You can add as many as article tags in HTML.

Article tag usages.

Forum post, Blog entry, comments of users and news articles seaction.

Search engine crawlers are not supporting those tags yet. However, in upcoming days they will start supporting. Modern browsers started supporting those HTML5 tags.

We are using HtmlGenericControl to generate new HTML5 article tag.

  protected void Button4_Click(object sender, EventArgs e)
  {
      HtmlGenericControl article = new HtmlGenericControl("article");
      article.InnerHtml = @"

This is header tag.

Content of article goes here.

"; PlaceHolder1.Controls.Add(article); }

HTML Output of above code.

<article><h1>This is header tag.</h1><p>Content of article goes here.</p></article> 

You can also add ID to article and other attributes.

protected void Button4_Click(object sender, EventArgs e)
  {
      HtmlGenericControl article = new HtmlGenericControl("article");
      article.ID="article1";
      article.InnerHtml = @"

This is header tag.

Content of article goes here.

"; PlaceHolder1.Controls.Add(article); }

Tags:

Basic HTML5 TagsC# HtmlTextWriter ExampleHow to remove Security TagsASp.net 2.0 step by step Membership Provider HTML5 Tutorialasp net image uploadAsp.net Interview Questions for 2 years or 3 years experianceAsp.net Convert String To ImageAsp.net Convert Image To Base64How to implement Captcha in Asp.netHTML5 Video Player Tutorial

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.