PDA

View Full Version : need help...im new to xhtml...


freaq
06-03-2006, 04:20 AM
Hey guys...im new here and im kinda new to the concept of xhtml...it's part of the diploma im taking...so here's a couple of questions...

why is it that everytime i try to validate my web page it says there's a utf-8 problem and it dosen't recognize the input?

and what are the deprecated tags and what are their replacements?

i was doin html before and the transition is quite hard and my web searches haven't been helping out much so it would be great if you guys can help me...thanks in advance...

Alex Vincent
06-03-2006, 04:43 AM
We can't do anything without seeing your source code. :)

nokrev
06-04-2006, 08:12 AM
A Google for "html vs. xhtml" came up with some interesting results, most helpful of which, was this: http://www.w3schools.com/xhtml/xhtml_html.asp tutorial. It states most of the major differences.

I think your server (are you using a url, or uploading a file?) may be serving your file under a different character-set than your file is, so the validator is getting confused. Perhaps, though, you have a meta tag that conflicts with the format of the file. I'm not sure, though.

karinne
06-06-2006, 08:00 PM
Hey there, here's a list of HTML elements (http://www.w3.org/TR/html4/index/elements.html) and attributes (http://www.w3.org/TR/html4/index/attributes.html). Go through them. When you see a "D", it mean the element or attribute is deprecated and therefore should not be used. For example the <font> element ;)

See here for Differences with HTML 4 (http://www.w3.org/TR/xhtml1/#diffs) from W3.org.

About the UTF thing ... do you have something like this

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

in the head of your html document?

Otherwise, as Alex pointed out, it's hard to help without the code or a link.

hth

DELOCH
06-15-2006, 01:08 AM
1) Freewebs has a problem with XHTML so do not use Freewebs

compare with this shell

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
</body>
</html>

XHTML is simple, I learnt the syntax in a month

anyways for a start try: www.w3schools.com

anyway: How to turn HTML to XHTML:

1) turn it bottomcase
2) turn all empty tags(ones with no termination) to <tag /> ex: <br />
3) scripts: <script language=javascript> to <script type="text/javascript">
4) use the shell
5) unlap <h1><center>Hi</h1>Hello</center> to <h1><center>Hello Hi</center></h1>
6) save as test.xml and check if it works both as xml and html, (xml should only desplay the data but should be of interest)
7) validate

Try, should work :D

VIPStephan
06-15-2006, 11:25 AM
5) unlap <h1><center>Hi</h1>Hello</center> to <h1><center>Hello Hi</center></h1>

From a pedagogical point of view it's a little imprudent to use a deprecated tag as/in an example....

DELOCH
06-16-2006, 01:49 AM
center is not depricated, it still works... but aligning does not work but still to get from HTML to XHTML 1.1/1.0 strict is only a total suicide guy or a person that knows both CSS and HTML because XHTML 1.1 or strict does not allow tags we used and still do depend on

i still use <div align="center"> instead of center, but center still works ;)

_Aerospace_Eng_
06-16-2006, 07:20 AM
I don't depend on align="center" as there are better CSS ways of centering a block level element, e.g. margin:auto; and for text, you can use text-align:center;
I've seen you give some pretty bad advice recently. I suggest you read up on what CSS and XHTML actually are.