How to Convert HTML to XHTML in VB.Net

XHTML is an extended version of the older HTML language, so adding the "DocType" designation to a VB.NET project lets you use the extended functions and language options. You can implement the XHTML DocType using VB.NET's Visual Studio software, which lets you code in the VB.NET language and create dynamic Web applications.

Instructions

    • 1

      Click the Windows "Start" button and select "All Programs." Click "Microsoft .NET," then click "Visual Studio." Open your VB.NET Web project.

    • 2

      Double-click the file in the right "Solution Explorer" window. The VB.NET Web form opens in the designer. Right-click the form and select "View Code" to switch to the HTML view.

    • 3

      Add the following DocType definition to the first line of HTML code:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      The code above sets the DocType to the XHTML format.

    • 4

      Add the XHTML definition to the "html" tag. Every Web page has a starting HTML tag. The following code is the HTML tag's opening definition for an XHTML format:

      <html xmlns="http://www.w3.org/1999/xhtml" >

Related Searches:

References

Comments

Related Ads

Featured