Solved

HTML Syntax not the same

Posted on 2004-09-29
10
208 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
  • 5
  • 3
  • 2
10 Comments
 
LVL 5

Expert Comment

by:stumpy1
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 33

Accepted Solution

by:
raterus earned 50 total points
Comment Utility
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
Comment Utility
Excellent, thank you sir/miss
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 5

Expert Comment

by:stumpy1
Comment Utility
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
Comment Utility
interesting stumpy, when I try that the intellisense only lists valid html attributes (around 10).
0
 
LVL 5

Expert Comment

by:stumpy1
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now