Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

HTML Syntax not the same

Posted on 2004-09-29
10
Medium Priority
?
217 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 33

Accepted Solution

by:
raterus earned 200 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

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!

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

704 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