Solved

HTML Syntax not the same

Posted on 2004-09-29
10
214 Views
Last Modified: 2012-05-05
Hi team, I developed a html table in Dreamweaer Mx v7, and cut and pasted the code into a c# web form. The forms displays as coded but the html for a td bordercolour value is not valid, visual studio tell me that this is not a vaild element. Why is this? How can two modern applications have different html properties?

Cheers

Wayne Atherton
0
Comment
Question by:watherton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 5

Expert Comment

by:stumpy1
ID: 12179773
I think it may be a difference in the spellings, VS uses the american spelling of BorderColour!!! See below for example - Its <TD bordercolor as opposed to <TD bordercolour

<TABLE id="Table1" borderColor="aqua" cellSpacing="1" cellPadding="1" width="300" border="1">
      <TR>
            <TD bordercolor="#ffcc00"></TD>
            <TD bordercolor="#6699cc"></TD>
            <TD bordercolor="#ff0000"></TD>
      </TR>
</TABLE>
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12179789
BTY, I havent used Dreamweaver Mx v7 so im guessing that it spells it as bordercolour as opposed to VS spelling it as bordercolor
0
 

Author Comment

by:watherton
ID: 12180067
stumpy1, on the html view in vs a press space bar to get the list of available tags i can use within my td and border is not there.

i have align,valign,hieght,width,bgcolor, plus all the others, but no border colour.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Accepted Solution

by:
raterus earned 50 total points
ID: 12180304
border-color is a css element, you'll have to implement this via stylesheets

<td style="border-color: red; border-width: 1px; border-style: solid;"></td>
0
 

Author Comment

by:watherton
ID: 12180400
Excellent, thank you sir/miss
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12180430
I am using visual studio 2003 enterprise architect edition. In html view, when I type '<table ' i get a drop downlist with 40 or 50 properties + methods listed, bordercolour is the 3rd in this list.
also when I type '<td ' i get a list of 40 or 50 properties and methods, bordercolor is the 4th in this list.

Ive also used the style="border-color:..." in association with stylesheets as raterus suggests, its a much better and more extensibly implementation.
0
 
LVL 33

Expert Comment

by:raterus
ID: 12180515
interesting stumpy, when I try that the intellisense only lists valid html attributes (around 10).
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12180785
Ive tried it with different bordercolor and it works for me. The code I posted above is a direct copy and paste from my aspx page and the table and cells each have different border colours!!

Seems very strange.  Im on VS 2003 EA with .Net Framework 1.1 on W2K SP4
0
 
LVL 33

Expert Comment

by:raterus
ID: 12181003
going by the W3C's standard, <td bordercolor="#FFCC00"></td> is not valid html (nor do I think it ever has been).

Browsers like to stretch the rules a bit though (for designers who don't know better), which is why it probably works.  Now if you are saying visual studio's intellisense is allowing you to create that attribute, then that would be a problem...
0
 
LVL 5

Expert Comment

by:stumpy1
ID: 12181163
Yip, VS intellisense alows me to create the attribute.

I think I figured out what the story is, watherton stated that they pasted html code into a webform (.aspx page). In the html behind the webform, intellisense allows bordercolor as an attribute, along with 40 or 50 other methods and properties. This is probably because the .Net aspx parser will interpret and translate this as needed.

However if I create an ordinary HTML page (.htm) then intellisense only gives me the following options for the <table
align
bgcolor
border
cellpadding
cellspacing
height
id
runat
width

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question