Help with XHTML

  onemadjock 18:23 18 Nov 03
Locked

I've got to make sure my web page has no deprecated tags so using an external css file. Everything seems to be ok until i put the code> !DOCTYPE> /code> part in it. It takes away most of the formatting.

Any one got any ideas?

Doing it in HTML 4.0 is not an option sadly....

  onemadjock 18:24 18 Nov 03

ignore the code bit - its the doctype where you state thats its a xhtml document

  Talented Monkey 19:31 18 Nov 03

It may be that the doctype you are using is wrong. Are you using strict or transitional? This will have an effect on your CSS and child parent relationship.

Have a look at this click here this will tell you the basics and give you correct doctype code. XHTML is further down the page.

If you are using correct tags etc and typed it in yourself I wonder if the CSS disappearing is down to a typo if you have missed off a double quote, left than or greater than sign, then the command you left it off, will include everything down to the next instance of the termination character as belonging to the same line of code. Obviously the next part will be the CSS link tags and therefore not being processed correctly and you loose your CSS

Hope this is of help

Andrew.

  onemadjock 21:41 18 Nov 03

here different versions of my page with and without the declaration:

<a href="click here">without</a>

<a href="click here">with</a>

Safe to say i'm at a loss why its not executing it correctly. My style sheet is <a href="click here">here</a> if this is of some help.

Thanks

  onemadjock 21:45 18 Nov 03

doh! sorry the last link didnt work -click here

Excuse the code mishaps - first time i've posted a link on here!

  PurplePenny 22:46 18 Nov 03

The problem may be that you are using a tag that is disallowed under strict XHTML so try changing the DTD to transitional and see what happens.

Penny

  onemadjock 22:57 18 Nov 03

nope still no joy - tried strict and transistional

  PurplePenny 23:07 18 Nov 03

I just tried running both pages through the W3C validator click here to see whether it would give any clues but it wouldn't validate either of them and gave the following message:

"I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to validate the document. The sources I tried are:
The HTTP Content-Type field.
The XML Declaration.
The HTML "META" element."

I don't know whether that helps to narrow things down or not but it was worth a try.

Penny

  Taran 23:55 18 Nov 03

That's an error generated when the server the pages are sitting on is not sending out the appropriate 'charset' information for the document type.

The page cannot be validated since the validator can't figure out what it's trying to deal with.

No character encoding from the web server means the page is just a mystery to the code validator.

HTTP, XML and HTML are the three identifyers commonly searched for, so the error message is actually answering it's own problem by telling you what it tried before coming to the conclusion that it didn't work.

T

  Taran 23:57 18 Nov 03

identifyers ?

where the heck is my spellchecker when I need it the most...

;o)

  Talented Monkey 11:31 19 Nov 03

Do the links work for anyone else? I have tried several times since yesterday but each time page fails to display. maybe this is reason why validator will not work.

I was going to have a look at the code myself, I still think this could be a typing error or somthings amiss, seeing the code will be like a picture, speaks a thousand words!

This thread is now locked and can not be replied to.

iPhone 7 review: a range of small updates add up to an excellent phone

1995-2015: How technology has changed the world in 20 years

How New York’s Stylin’ Seniors became a golden social media campaign

23 Apple Watch tips & secret features: Master your Apple Watch, Apple Watch Series 1 or Apple…