Questions tagged [xhtml-1.0-strict]

XHTML 1.0 Strict is a legacy version of HTML that was formulated as the XML equivalent to strict HTML 4.01. It includes only the elements and attributes that had not been marked deprecated in the HTML 4.01 specification.

Along with XHTML 1.0 Strict there were also XHTML 1.0 Transitional and Frameset versions.

XHTML was a name formerly used for a casting of HTML in XML syntax, to use with XML parsers.

http://en.wikipedia.org/wiki/Xhtml

XHTML 1.0 Strict does not include presentational tags (like <font> or <b>) or the <script> tag, meaning that all other languages other than HTML or XML (that are allowed) must be declared as either links to files (<link type="text/css" href="file.css" />, <script type="text/javascript" src="file.js" />) or declared within the file as valid tags (<style type="text/css">). Currently, JavaScript must be referenced using the src attribute of the <script> tag, you cannot type it directly onto your XHTML 1.0 Strict page.

XHTML 1.0 Strict has certain requirements that all pages with its doctype must meet:

  1. The doctype <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ensures that the web browser knows that the document type is XHTML 1.0 Strict.

  2. The character encoding can be added in two ways: 1. <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> in the <head> element, or 2. <?xml version="1.0" encoding="utf-8"?> above the doctype. This ensures that odd characters, for example π,  or 煸 are correctly displayed.

185 questions
67
votes
5 answers

Can we place `` inside `

` according to web standards?

Can we place inside

according to web standards? like this

Demo text

Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852

51
votes
10 answers

xHTML/CSS: How to make inner div get 100% width minus another div width

I have 2 nested divs inside outer one, which has width:100%. Both nested divs should be in one line and first should get it size from it's contents:
Artem
  • 7,275
  • 15
  • 57
  • 97
29
votes
8 answers

XHTML Strict 1.0 - target="_blank" not valid?

I just validated my actual XHTML Strict 1.0 doc with the w3c validator service.. and it says that,
29
votes
3 answers

Are single quotes valid in HTML/XHTML?

Are single quotes valid in HTML? And more specifically: XHTML strict.
Andrew
  • 227,796
  • 193
  • 515
  • 708
25
votes
5 answers

Can I add Microdata from HTML5 to a XHTML Strict site and still be compliant?

I've got a site coded in XHTML 1.0 Strict. I want to use the new Microdata to add breadcrumbs to my site (so Google will understand them). My old non-microdata marked-up breadcrumbs look like this:
23
votes
4 answers

Is it possible to render empty
with CSS in xHTML strict 1.0 without setting width and height in pixels?

Is it possible to render empty
with CSS in xHTML strict 1.0 without setting width and height in absolute values and not adding   inside? Targets are IE7-8, FF 3.x Can I somehow render empty div if I want it to…
Artem
  • 7,275
  • 15
  • 57
  • 97
22
votes
13 answers

What problem does XHTML strict solve?

I really don't understand the fascination with XHTML strict. Inline JavaScript typically requires a rats nest of escapes to make it compatible with XHTML and semi-backwards compatible with MSIE 5 & 6. Then there is the issue of not being OCD…
David
  • 17,673
  • 10
  • 68
  • 97
21
votes
13 answers

How can I view Arabic/Persian numbers in a HTML page with strict doctype?

I have an HTML page that is right-to-left. When I don't use any doctype, my numbers are in Arabic/Persian, but when I use strict mode they turn to English. Before adding doctype: After adding…
Mahdi
  • 725
  • 2
  • 7
  • 24
17
votes
3 answers

Why aren't browsers strict about HTML?

It's a well known fact that browsers will accept invalid HTML and do their best trying to make sense out of it. If you create a web page containing only the following code: This is bad HTML
Francisco Zarabozo
  • 3,676
  • 2
  • 28
  • 54
16
votes
1 answer

"Converting" XHTML 1.0 Strict to HTML5

OK folks, So I have a valid XHTML 1.0 Strict webpage. I'm aware of the differences between XHTML and HTML, but, what are the differences between XHTML and HTML 5? Would a 'conversion' be as easy as changing the Doctype, and it would all still…
Jack
  • 9,615
  • 18
  • 72
  • 112
15
votes
5 answers

XHTML won't validate && and < in a JavaScript function

Here's the snippet of code that won't validate: if (user_age > 15 && user_age < 91) It gets the following errors: XML Parsing Error: StartTag: invalid element name and XML Parsing Error: xmlParseEntityRef: no name The first error is thrown for…
user183621
12
votes
5 answers

Nest lists in paragraphs in html

It seems that (strict) html doesn't allow nesting any non-inline elements inside a

, but then how am I supposed to render a paragraph that contains a list (something that occurs often in natural texts). I've seen three answers that all seem…

Zee
  • 123
  • 1
  • 5
12
votes
1 answer

HTML5 Doctype with strict

I want a strict but fully compatible html5 alternative to: Basically I want to ensure the use of closing tags just to keep everything well readable, consistent and highlighted clearly in editors. The answer to this question is to…
Anon343224user
  • 584
  • 1
  • 5
  • 17
10
votes
3 answers

XHTML 1.0 Strict (or Transitional) compliance in ASP.NET 2.0/3.5

Are there any good methods for getting ASP.NET 2.0 to validate under the XHTML 1.0 Strict (or Transitional) DTD? I'm interested to hear some ideas before I hack up the core of the HTTP response. One major problem is the form tag itself, this is the…
craigmoliver
  • 6,499
  • 12
  • 49
  • 90
9
votes
4 answers

html doctype adds whitespace?

can someone please explain to me why having a doctype of and render the following block differently under firefox?
pstanton
  • 35,033
  • 24
  • 126
  • 168
1
2 3
12 13