Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > not valid HTML error

Reply
Thread Tools

not valid HTML error

 
 
John Salerno
Guest
Posts: n/a
 
      10-06-2006
I got this error while validating my page:

document type does not allow element "UL" here; assuming missing "LI"
start-tag.

Here's the suspicious code. The problem seems to be that I can't nest
list blocks within other list blocks. But if not, how can I create this
"subnote" effect?

Thanks.


<ol>
<li>XRC creates an <code>object</code> node that represents the
particular widget you are making.</li>
<li>Instead of the call to <code>wx.Button</code>, XRC uses a
<code>class</code> attribute with the value "wxButton."</li>
<ul>
<li>Note that XRC can only use the C++ class names, i.e.
there is no dot operator.</li>
</ul>
<li>XRC uses an attribute called <code>name</code> to refer to
this object in your Python program. The <code>name</code> attribute
actually corresponds to the <code>id</code> parameter in the widget's
constructor. You assign it a string value in the XRC file and wxPython
will create a unique ID for it internally.</li>
<ul>
<li>This value does <em>not</em> have to be the same as the
name of the variable you will use to refer to this widget in your
program. The value of <code>name</code> is not the name you will use to
refer to this object in your program.</li>
</ul>
<li>Once this object node is created, the keyword parameters of
the Button's constructor become child nodes, each with the value of that
particular argument. So here we have the <code>label</code> node created
with the text that will appear in the Button, just as if we had manually
written the Button constructor with the <code>label</code> argument.</li>
<li>The <code>parent</code> argument is not created as a child
node. Instead, the entire Button object node will be a child node of a
Panel object, which in turn will be a child node of a Frame object. This
is how wxPython knows the parent-child relationship. Below you can see
the entire structure of a Frame with a Button.</li>
</ol>
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      10-06-2006
John Salerno wrote:

> I got this error while validating my page:
>
> document type does not allow element "UL" here; assuming missing "LI"
> start-tag.
>
> Here's the suspicious code. The problem seems to be that I can't nest
> list blocks within other list blocks. But if not, how can I create this
> "subnote" effect?


Your code:

> <ol>
> <li>....</li>
> <li>....</li>
> <ul>
> <li>....</li>
> </ul>
> <li>....</li>
> </ol>


Correct code:

<ol>
<li>....</li>
<li>....
<ul>
<li>....</li>
</ul>
</li>
<li>....</li>
</ol>


--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: Annie Lennox - Little Bird
 
Reply With Quote
 
 
 
 
John Salerno
Guest
Posts: n/a
 
      10-06-2006
John Salerno wrote:
> I got this error while validating my page:


I wonder if someone could explain this to me also. It validates, but I
don't understand the warnings:

Warnings
URI : http://python.johnjsalerno.com/xrc_tutorial.css

* Line : 6 (Level : 1) This property applies to block-level
elements. : h1
* Line : 12 (Level : 1) You have no color with your
background-color : .codeblock

Valid CSS information

* body {
o font : small/1.5em Verdana, Helvetica, Arial, sans-serif;
}
* h1 {
o text-align : center;
}
* .codeblock {
o font : medium/1.2em monospace;
o border : thin dotted gray;
o background-color : #ebe5e5;
}
 
Reply With Quote
 
John Salerno
Guest
Posts: n/a
 
      10-06-2006
Els wrote:

> Your code:


> Correct code:



Thanks!
 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      10-06-2006
John Salerno wrote:

> John Salerno wrote:
>> I got this error while validating my page:

>
> I wonder if someone could explain this to me also. It validates, but I
> don't understand the warnings:
>
> Warnings
> URI : http://python.johnjsalerno.com/xrc_tutorial.css
>
> * Line : 6 (Level : 1) This property applies to block-level
> elements. : h1


This one is superfluous imo, as h1 *is* a block-level element. It's
perfectly correct and logical to set text-align:center for h1. I don't
know why the validator feels the need to call your attention to it.

> * Line : 12 (Level : 1) You have no color with your
> background-color : .codeblock


This is because you have not set a colour for the text in .codeblock.
This could potentially cause an inherited text colour to be the same
as the set background-color. Not an error, but a warning to pay
attention to styles that could cause problems in certain situations.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: Daryl Hall and John Oates - Rich Girl
 
Reply With Quote
 
John Salerno
Guest
Posts: n/a
 
      10-06-2006
Els wrote:

>> * Line : 12 (Level : 1) You have no color with your
>> background-color : .codeblock

>
> This is because you have not set a colour for the text in .codeblock.
> This could potentially cause an inherited text colour to be the same
> as the set background-color. Not an error, but a warning to pay
> attention to styles that could cause problems in certain situations.
>


Thanks once more! If I wanted to do this, would I just use the 'color'
property to set text color? It seems too general of a name, but that's
what's listed on the reference site I'm looking at.
 
Reply With Quote
 
John Salerno
Guest
Posts: n/a
 
      10-06-2006
John Salerno wrote:
> Els wrote:
>
>>> * Line : 12 (Level : 1) You have no color with your
>>> background-color : .codeblock

>>
>> This is because you have not set a colour for the text in .codeblock.
>> This could potentially cause an inherited text colour to be the same
>> as the set background-color. Not an error, but a warning to pay
>> attention to styles that could cause problems in certain situations.
>>

>
> Thanks once more! If I wanted to do this, would I just use the 'color'
> property to set text color? It seems too general of a name, but that's
> what's listed on the reference site I'm looking at.


Nevermind, a simple test showed that this is the property to use! Seems
like it should be 'text-color', or something more specific...
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      10-06-2006
John Salerno wrote:

> * body {
> o font : small/1.5em Verdana, Helvetica, Arial, sans-serif;
> }


Please see:
http://k75s.home.att.net/fontsize.html

Thanks.

--
-bts
-Motorcycles defy gravity; cars just suck
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      10-06-2006
Scripsit John Salerno:

> URI : http://python.johnjsalerno.com/xrc_tutorial.css
>
> * Line : 6 (Level : 1) This property applies to block-level
> elements. : h1


How did you get that warning? Using the W3C "CSS Validator" on your CSS
code, I get no such message, even when I have selected "All" in the
"Warnings" menu.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
John Salerno
Guest
Posts: n/a
 
      10-06-2006
Jukka K. Korpela wrote:
> Scripsit John Salerno:
>
>> URI : http://python.johnjsalerno.com/xrc_tutorial.css
>>
>> * Line : 6 (Level : 1) This property applies to block-level
>> elements. : h1

>
> How did you get that warning? Using the W3C "CSS Validator" on your CSS
> code, I get no such message, even when I have selected "All" in the
> "Warnings" menu.
>


Hmm, I just tried it again and you're right, it's not there now. But it
was earlier, and I haven't changed it since then.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. rote ASP .Net 2 01-23-2008 03:07 PM
error:Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation Henry Lee ASP .Net 1 05-03-2006 10:25 PM
Error: specified cast is not valid. Why not? Alan Silver ASP .Net 5 02-15-2005 08:08 PM
Valid HTML 4.01 or not? Thomas Due ASP .Net 2 04-20-2004 07:50 PM
I get the following error ( Specified cast is not valid ) with Server.Transfer Andrew ASP .Net 0 08-12-2003 08:26 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57