xhtml

What's the difference between <b> and <strong>, <i> and <em>?

What's the difference between <b> and <strong>, <i> and <em> in HTML/XHTML? When should you use each? ...

CSS Layout Question

I can't for the life of me find a way to make this work. If I have 3 divs (a left sidebar, a main body, and a footer), how can I have the sidebar and main body sit next to each other without setting their positions as "absolute" or floating them? Doing either of these options result in the footer div not being pushed down by one or the ...

XHTML and & (Ampersand) encoding

My website is XHTML Transitional compliant except for one thing: the & (ampersand) in the URL are written as it is, instead of &amp; That is, all my urls in pages are as usual as: <a href="http://www.foo.com/page.aspx?x=1&amp;y=2"&gt;Foo&lt;/a&gt; But XHTML validator generets the error cannot generate system identifier for general ...

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 enough on user input to make sure you don't miss any illegal characters. It just seems like m...

What is the current level of XHTML support in browsers and search engine spiders?

Ignoring the IE case, are there any other browsers that can't understand the application/xhtml+xml content type? And what about the search engine spiders? I could not find any answers on the web that would not be a few years old and thus possibly inaccurate. Edit: Somehow related question: http://stackoverflow.com/questions/278746/what...

Transforming HTML with XSL and modifying form attributes

I would like to parse HTML document and replace action attribute of all the forms and add some hidden fields with XSL. Can someone show some examples of XSL that can do this? ...

Parsing XML/XHTML in Actionscript

Is there anything similar to getElementById in actionscript? I'm trying to make a prototype of a flash page wich gets it's data from a xhtml file. I want to have both an accessible html version (for search engines, textreaders and people without flash) and a flash version (because the customer insists to use flash even though a html-cs...

RelaxNG (rnc) schema to extend XHTML

I would like to edit XHTML files using Emacs' nxml-mode which can use rnc schemas for on the fly validation. This is all built in to newer Emacs versions. However, my XHTML files contain elements from another schema. So <foo:foo> tags are valid, but only within the <xhtml:head> of the document. Currently, nxml complains because the XHT...

How semantic is your XHTML/CSS markup?

I think I'm pretty good at using semantic markup on my pages but I still have a handful of classes like this: /**** Aligns ****/ .right_align { text-align: right; } .left_align { text-align: left; } .center_align { text-align: center; } Which, technically, is a no-no. But when you just want to position some text in a table, how cra...

How do I fix wrongly nested / unclosed HTML tags?

I need to sanitize HTML submitted by the user by closing any open tags with correct nesting order. I have been looking for an algorithm or Python code to do this but haven't found anything except some half-baked implementations in PHP, etc. For example, something like <p> <ul> <li>Foo becomes <p> <ul> <li>Foo</li> </ul...

How do I retreive an HTML element's actual width and height?

Suppose that I have a <div> that I wish to center in the browser's display (viewport). To do so, I need to calculate the width and height of the <div> element. What should I use for maximum browser compatibility? Looking for a solution that works on IE6+, FF2+, Opera and Webkit-based browsers (Safari 3+, Google Chrome). ...

Why doesn't xpath work when processing an XHTML document with lxml (in python)?

I am testing against the following test document: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title>hi there</title> </head> <body> ...

Is there a semantic version of <u>?

Hi, In XHTML Strict, it seems that you're not allowed to use the <u> tag any more. Is there a semantic equivalent like there is for <b> and <i>? If not, is there any convention for how to markup underlined text in XHTML? Thanks. ...

Convert XHTML to Word ML

What is the best way to convert word HTML to word XML? I cannot buy a tool so need something preferably XSLT which is free and works suitably with basic formatting like paragraphs, lists, bold and italic. ...

Where can I find the Dojo XMLNS DTD?

I want to add some Dojo widgets to my XHTML pages, but Dojo uses some attributes that aren't part of the XHTML spec. For example: <input dojoType="ComboBox" type="text" dataUrl="/some_data.json" /> The dojoType and dataUrl attributes cause validation problems. I believe Dojo lets me move dojoType into the class attribute: <input cl...

What is the best way of converting a Microsoft Word document into XHTML?

I would like to programatically convert a Microsoft Word document into XHTML. The language of choice is PHP, so I would appreciate any suggestions with PHP. The initial idea is trying to convert the doc file into odt, and then use the Odt2Xhtml PHP class to get it into XHTML format. Any better way to do this? ...

Is it still necessary to put a space before closing an empty element in XHTML?

W3C recommends putting a space before the closing tag in XHTML, because this would give a better backwards compability with some browsers, e.g. write <br /> instead of <br/>. But are there still browsers out there, that would not tolerate that you omitted the space? (W3C do not mention which browsers cause problems.) I know it doesn't m...

JavaScript & IE7 - Why won't my *.onload = function() { } fire?

I have a gallery I quickly coded up for a small site, and under Firefox 3 and Safari 3 works fine. But when I test on my old best friend IE7, it seems to not fire the imageVar.onload = function() { // code here }.. which I want to use to stop the load effect and load the image. The site is at http://www.stationhotels.com.au/new/?page=a...

How to get form fields from a specific fieldset?

I'm writing a HTML form that's divided in fieldsets, and I need to get the form fields from a specific fiedset in a function. Currently it's like this: function conta(Fieldset){ var Inputs = Fieldset.getElementsByTagName("input"); var Selects = Fieldset.getElementsByTagName("select"); /* Doing the stuff I need to do ...

How to make this site browser independent

I got this page, and have some problems with ie < 7 and opera 7.11 This is what i hoped to be the layout in all browsers, and these are the IE ones instead: ie 5.5 and ie 6.0. the xhtml is quite simple: print "<div id=\"page\"> <div id=\"header\"> <ul id=\"nav\"> <li><a href=\"/\" class=\"first\">Címlap<div>Az oldal címlap...