dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasgoMobi

Posted by RedTyger 4 years 2 weeks ago

pic
 RedTyger
mobiForge Enthusiast
Posts: 15
Joined: 5 years ago
[offline]

First the bug, the XHTML validator failed the valid markup check with an error message saying that the a element name attribute could not be empty. The code was: <a name="comment"></a>. The error actually referred to the hyperlink containing no text, which I believe is valid markup.

The question is that the test is also failing me for not specifying image dimensions inline, but the image dimensions are specified separately in the CSS. As best I can tell from the emulator, it is causing no slowdown or redrawing. Should inline dimensions also be included?

Posted by ruadhan 4 years ago

pic
 ruadhan
dotMobi logo
Mobile Champion
Posts: 710
Joined: 5 years ago
[offline]

Hi,
For the image tag in xhtml, you should be using the id attribute instead of the name attribute. Sometimes the validator produces messages that are a little tricky to understand, such as:

FAIL near line 9 column 19  
Attribute "name" must be declared for element type "a".

( I think this is the message you received)

We have put together a page with explanations of the most common such messages, and what it means for your markup. You can access this page by clicking the "Help me fix it link" in the results page of ready.mobi. This link will also get you there.
Basically in your case, the message is saying that "name" needs to be declared in the DTD before it can be used in your xhtml document.

Regarding image dimensions: you should specify them inline (see this link)

Ruadhan O'Donoghue
dotMobi