The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> In-correct html
B Blackett
post Jan 6 2014, 08:50 AM
Post #1





Group: Members
Posts: 2
Joined: 6-January 14
Member No.: 20,185



Please can you tell me what this should be as it is not correct html.
<td colspan="2">
<table border="1" bordercolor="#FFCC00" style=
"background-color:#FFFFCC" width="100%" cellpadding="3"
cellspacing="3"
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Jai
post Jan 6 2014, 10:09 AM
Post #2


Novice
**

Group: Members
Posts: 23
Joined: 12-September 13
Member No.: 19,717



QUOTE(B Blackett @ Jan 6 2014, 08:50 AM) *

Please can you tell me what this should be as it is not correct html.
<td colspan="2">
<table border="1" bordercolor="#FFCC00" style=
"background-color:#FFFFCC" width="100%" cellpadding="3"
cellspacing="3"



You're miles away.

Try this http://www.w3schools.com/html/html_tables.asp

Come back when you have had another try and we can sort something out
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
B Blackett
post Jan 6 2014, 11:02 AM
Post #3





Group: Members
Posts: 2
Joined: 6-January 14
Member No.: 20,185



The below was copied from w3schools tables instructions but does not validate correct, it is the only thing wrong on the whole site.
I know people give there time free on forums but the advice is not much help, thanks anyway.
QUOTE(Jai @ Jan 6 2014, 03:09 PM) *

QUOTE(B Blackett @ Jan 6 2014, 08:50 AM) *

Please can you tell me what this should be as it is not correct html.
<td colspan="2">
<table border="1" bordercolor="#FFCC00" style=
"background-color:#FFFFCC" width="100%" cellpadding="3"
cellspacing="3"



You're miles away.

Try this http://www.w3schools.com/html/html_tables.asp

Come back when you have had another try and we can sort something out

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jan 6 2014, 11:07 AM
Post #4


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Then post the url to your page, so we can see the whole thing.

It might have to do with the DOCTYPE you use.
If it's HTML5, then you are supposed to use CSS instead of table attributes.

[added]
A simple search returns a useful list of equivalents at http://wiki.whatwg.org/wiki/Presentational..._and_attributes .

This post has been edited by Frederiek: Jan 6 2014, 11:12 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 6 2014, 01:14 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Which goes to show w3schools.com isn't always to be trusted.

That said, the only thing not valid in the above (provided the the closing tags are were they should be) is the bordercolor attribute. It doesn't exist. You need to use CSS for that. To do that you probably need to read up about the CSS table model, because with CSS you define the borders of all the table elements separately and a border color applied to TABLE would only affect the borders of TABLE, not the ones of the individual cells. Even if you don't want to do it all with CSS, it would be better to move everything about borders to CSS in case some browser out there gets confused by a mix of CSS and HTML borders.

http://www.w3.org/TR/CSS2/tables.html
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th April 2024 - 12:04 AM