PC Review


Reply
Thread Tools Rate Thread

How can it work without a closing tag

 
 
Tony Johansson
Guest
Posts: n/a
 
      10th Jun 2011
Hello!

Here is an example and as you can see I have no closing tag on element table
and it works just fine how is that possible ?
Can somebody explain that.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>

<body>
<form id="form1" runat="server">
<asp:Repeater ID="MyFriends" runat="server">
<HeaderTemplate>
<table style="border: 1px double #000000;">
<tr style="background-color: #00FF00;">
<td>First Name</td>
<td>Last Name</td>
<td>Telephone</td>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr style="background-color: #FFFF00">
<td><%# Eval("fname")%></td>
<td><%# Eval("lname")%></td>
<td><%# Eval("phone")%></td>
</tr>
</ItemTemplate>

<AlternatingItemTemplate>
<tr style="background-color: #00FF00">
<td><%# Eval("fname")%></td>
<td><%# Eval("lname")%></td>
<td><%# Eval("phone")%></td>
</tr>
</AlternatingItemTemplate>
</asp:Repeater>
</form>
</body>
</html>

//Tony


 
Reply With Quote
 
 
 
 
Jeff Johnson
Guest
Posts: n/a
 
      10th Jun 2011
"Tony Johansson" <(E-Mail Removed)> wrote in message
news:istdkp$3a2$(E-Mail Removed)...

> Here is an example and as you can see I have no closing tag on element
> table and it works just fine how is that possible ?
> Can somebody explain that.


Browsers are very forgiving.


 
Reply With Quote
 
Lee J. Moore
Guest
Posts: n/a
 
      10th Jun 2011
On Fri, 10 Jun 2011 17:35:50 +0200, Tony Johansson wrote:

> Hello!
>
> Here is an example and as you can see I have no closing tag on element
> table and it works just fine how is that possible ? Can somebody explain
> that.


There is enough information there to render the table, and no additional
complex html to confuse the rendering engine before the </body> tag.

Also, internet browsers try to render bad code by design. If they didn't,
more than half the internet wouldn't work because few sites are W3C
compliant.
--
Lee J. Moore
Cheshire, UK

"He who knows, does not speak. He who speaks, does not know." - Lao Tzu
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lost work due to closing unexpectedly =?Utf-8?B?Tmljb2xl?= Microsoft Word Document Management 1 17th Aug 2006 09:25 PM
CF: Closing COM-Port do not work Michael Obi Microsoft C# .NET 0 20th Apr 2006 05:07 PM
Closing down Excel work books peterspindrift Microsoft Excel Misc 0 26th Sep 2004 07:20 PM
Closing down Excel work books peterspindrift Microsoft Excel Misc 3 26th Sep 2004 06:36 PM
closing forms does not work Stefan Berger Microsoft Outlook Form Programming 0 12th Feb 2004 02:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:45 PM.