valid-xhtml

Is an XHTML doc nested inside an XHTML doc invalid?

Hi Guys, The background to this is that we have a ASP.NET master page that reads its contents from a file supplied to us by a third party. The file that they supplied is a complete HTML document (including DOCTYPE declaration, tags with & tags also). We then take that wrapper and insert its contents into the project’s Master pages...

Can we place `<img>` inside `<h1>` according to web standards?

Can we place <img> inside <h1> according to web standards? like this <h1> Demo text <img src="anyimage.jpg"/> </h1> ...

Why <div style="width:50%" /> is not rendered in xHTML?

Why <div style="width:50%" /> is not rendered in xHTML? If I do <div style="width:50%"> &nbsp; </div> only then it is rendered. Do I miss something? Will min-width help? I use strict xHTML 1.0 Is it possible to fix it with CSS only or I must change html markup? ...

IE's XHTML Compatibility

Hi stackoverflow, I'm having a rather heated debate into IE's XHTML Compatibility. The only thing is, I'm unsure if the guy is trolling. Essentially he claims that IE has absolutely no XHTML compatibility, and that a document with a defined XHTML doctype means absolutely nothing when served as content type text/html, regardless of the...

How can I get the WordPress language_attributes function to return valid XHTML 1.1?

I have a WordPress template that contains the following element: <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes('xhtml'); ?>> This returns: <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US"> Unfortunately the "lang" attribute is invalid XHTML 1.1 - and the client would like thi...

.NET xhtml validator library - offline

Hi, do you know about any XHTML validation library for .NET? I found that it's possible to use W3C API. But the problem I have is that I need to validate passwords protected pages or page on local server. All libraries I found are using URL as parameter for W3C validator. Do you know about any library? ...

Is the DOCTYPE relevant only to the markup or also to the DOM?

Up to what level of abstraction does the <!DOCTYPE> declaration (and content-type) of a document remain relevant? For example, if I'm working with XHTML but want to use an element which is not available in XHTML - an easy example being an iframe - would it be bad practice to programatically add the element with JavaScript? Or do I eithe...

Are single quotes valid in HTML/XHTML?

Are single quotes valid in HTML? And more specifically: XHTML strict. <table width="100%"> <table width='100%'> ...

Rails image_tag not closing image tag

On a rails project I am using the image_tag to generate my image html elements. <%= image_tag("test.jpg", :alt => "test image") %> is generating <img src="test.jpg" alt="test image"> This is happening throughout my entire rails project. Is there a setting somewhere that someone else set that is causing this? How can I get rails ...

Django Template For Loop Removing <img> Self-Closing

Django's for loop seems to be removing all of my <img> tag's self-closing...ness (/>). In the Template, I have this code: {% for item in item_list %} <li> <a class="left" href="{{ item.url }}">{{ item.name }}</a> <a class="right" href="{{ item.url }}"> <img src="{{ item.icon.url }}" alt="{{ item.name }} Logo." /> </a...

Validating Featured News Section of my website

I have a web portal that almost validates XHTML 1.0 transitional. However the featured news section on home page does not validate. I am wondering are there any way to validate this section without breaking functionality. Following is my template: Please tell me if website url needed: Not i added extra space before start and end tags. <...

PHP, XHTML and ampersands

How do I replace ampersands in a url from & > &amp; I use some rss feeds witch has URL containing & should I use $link = str_replace('&', '&amp;', $link); or there are other options? ...

Unable to Validate XHTML without breaking jQuery references

Hello guys, my webpage is www.bodrum_dev.info (Remove the underscore character from two words). I am trying to validate my page, but featured news section (that changes article headline and image on the left when mouse over to titles) generates 30 errors. I know the reason. Because i have h1 h2 and div tags inside an a tag. So basicall...

xhtml validation javascript

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> onmouseover="text.show('<br /><b>XXXXXX</b><br />')" Validation Output: Error: char...

How do I make a div that stays in a fixed position regardless of where you are on the page?

Case example: I have a long list of items, and when I put my mouse over this div changes to that picture of that item. No matter where you scroll to, the div remains in a fixed position. Sort of like a frame. ...

need help with markup for nested table data. needs to be semantic and accessible.

see image here: http://www.x-reference.com/wp-content/uploads/2010/05/nested-table-data.gif How should I write the code for the section entitled "Retiree and Employee On Demand Community" so that screen readers don't get confused on it? A nested table doesn't seem to be the best solution, it doesn't seem semantic either. The data in th...

Adding controls dynamically not XHTML formatted

Hi - I'm adding generic html controls to repeater items at "onitemdatabound". It works absolutely fine but just wondering (or hoping) if there's any way of getting those controls to render on the page in XHTML format? It's just an annoyance really - my markup is beautifully clean and correctly indented until the repeater! Using .net 3...

How important is it to have a validated site?

Many big website (google.com, apple.com, microsoft.com) are never validated. When the big shots don't do it, is there a reason why others should? ...

How to validate XHTML page that using fb:comments ,xid and <div href>?

I'm actually gettings these errors and I cannot let them fixed. I need some help. I can't found anything on Google, sorry. there is no attribute "href" <div id="audio" href="http://domain.com/mp3/Green Day - A Quick One While Hes… there is no attribute "xid" <div style="margin: 0px 100px;"><fb:comments xid="music52"></fb:comments></...

Invalid markup with XFBML and RDFa

EDIT: I switched back to XHTML 1.0 Transitional. It renders fine, but isn't valid. Help is still appreciated. Hello. I am trying to integrate the Facebook plugins into my website, PlugB. To make them validate at W3 validator, I added a XHTML + RDFa doctype. But I am getting errors with Iframes and FBML. How can I fix this? http://val...