-1

Can anyone advise why the following is not valid strict xhtml 1.0?

<p align="right"> 

<table align="right"> 

<form name="login" action="/scripts/login.cgi" method="post"> 
javapalava
  • 711
  • 1
  • 6
  • 15

1 Answers1

1

align attribute is presentational and replaced by CSS.

Paragraphs may not contain tables.

Forms may not be child nodes of tables.

name attribute of forms is removed in favour of id.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • Hi Quentin - sorry, I should have been more clear. Each of those are independent statements, so not nested in each other. It is a sample test question where we have to look at each snippet independently, and state why each isn't valid. – javapalava May 24 '16 at 12:37
  • But this is Valid which I don't understand, because that means align attribute is still valid in some circumstances? And thank you for the name/id pointer. – javapalava May 24 '16 at 12:39
  • You have a test in 2016 about what was made invalid between 1997 and 1999? When XHTML 1.0 Strict is now obsolete too? That's … practical. – Quentin May 24 '16 at 12:39
  • Some presentational stuff got left in because CSS replacements weren't quite there at the time. – Quentin May 24 '16 at 12:40
  • Yeah I know, it's absolutely ridiculous. And it's with a leading university. There are about 60 of us taking it, and none of us have a clue how to even find this information out - we haven't been taught it. Thanks for your help. – javapalava May 24 '16 at 12:43
  • Also, do you know of any way that I could find out where the use of align is valid, and where it isn't? – javapalava May 24 '16 at 12:47
  • XHTML 1 is mostly the same as HTML 4.01 which has a [table that shows which DTD attributes appear in and which are deprecated](https://www.w3.org/TR/html4/index/attributes.html). – Quentin May 24 '16 at 13:06
  • That is to say, the _elements_ and _attributes_ in XHTML1.0 are the same as in HTML 4.01. Other features differ. – Mr Lister May 24 '16 at 15:06