xhtml

quoting HTML attribute values

Hi I know the spec allows both ' and " as delimiters for attribute values, and I also know it's a good practice to always quote. However I consider " being the cleaner way, maybe it's just me having grown up with C and C++' syntax. What is the cleanest way of quoting attribute values and why? Please no subjective answers. ...

Scala xhtml attribute breaks because of a question mark

I had a problem with: <iframe id="iframe1" src='http://stockcharts.com/h-sc/ui?s=MT&amp;p=D&amp;yr=2&amp;mn=0&amp;dy=0&amp;id=p43321191731' width="300px" height="300px"></iframe> in Lift web framework (Scala) version. I get: Message: java.util.NoSuchElementException scala.RandomAccessSeq$$anon$13.next(RandomAccessSeq.scala:165) sca...

Automatic CSS Preview Generator - Have css file, want to automatically generate html to preview styles

I have a fairly large CSS file developed by my web designer. There are, of course, plenty of IDs, classes and tag properties assigned therein. Are there any tools to automatically generate HTML based on a CSS source file? For example: #basicInfoHead{ background:url(../images/leftHeaders.jpg) no-repeat; margin-left: 0px; w...

What is the role of name="..." attribute in input?

In this form code what is the role of name="" attribute? name="s" and name="submit". Is it necessary to add? <form action="/index.php" method="get"> <fieldset> <legend>Search</legend> <label for="s"><span>Search WaSP</span> <input value="" name="s" id="s"></label> <input type="submit" value="Go!" name="submit" > ...

Should I repeat label text in for="...." and id=".."?

Is there any cons of 2nd method? Why http://www.webstandards.org/ decided to use 2nd method Is first method better than first for screen reader users? First <label for="name">Name</label> <input id="name" /> Second <label for="n">Name</label> <input id="n" /> ...

Should we put <input> inside <label>?

I saw 2 different method on same form example: on http://www.alistapart.com/articles/prettyaccessibleforms/ why they are using 2 method in first fieldset they are keeping input after labeland in 2nd fieldset they are keeping input after label. Why? <fieldset> <legend>Delivery Details</legend> <ol> <li> <label for="name">N...

Should we use <label> for every <input>?

Should we use <label> for every input? , even for submit button and keep hidden thorough css if we don't want to show label. or no need of label for submit button? .hide {display:none} <fieldset> <legend>Search</legend> <label for="Search">Search...</label> <input value="" id="Search" name="Search"> <label for="Submit"...

innerHTML bug IE8

This innerHTML code wasn't working reliably in IE8: (but was working in IE6 IE7 FF Opera Chrome Safari) (by not working reliably I mean I had placed this code within onmouseover handlers on various elements, sometimes it would change the text when mousing over a given element and sometimes it wouldn't - there was no pattern to this - whe...

Can't style input field in IE6, Why?

I know, I know IE6 right? Well no matter how strong the argument -- I have to please IE6 at the moment. I have a text input field. I was to style it's font and background colors. But I can't get IE6 to display the changes I'm altering. Here;s my markup and css. <style> input[readonly='readonly'], input.readonly { color:red !...

Replace a word in an XML file through StreamReader in XNA?

Okay, so this is sort of a hack...but it may have to be. I'm writing an app in XNA, which from my research into this problem apparently doesn't support XML version 1.1. I'm reading in the contents of an ePub document, and one of the newer books contains its content directory as a version 1.1 XML document. This causes my program to crash....

How to add video into a webpage for mobile web browsers.

Our company is making a mobile version of our website. We have several product videos we want to show on the mobile version. When I try to use <a href="video.wmv">video</a> I get sound playing but a black screen on my htc incredible android os phone. I'm thinking that the video is playing but in a different browser window. I need ...

send SMS from WAP page

This question is related to sending an SMS from a link in a WAP page? Historically I have used sms: which has worked on SonyEricsson, Nokia and other such 'legacy' devices. An example of the mark-up would be; <a href="sms:0123456789?body=test%20message">send</a> I am aware that i-phone does not allow you to specify the body. If the b...

why do people still use tables, inline css, et al?

When you learn HTML and so forth nowadays, the mantra is always "Clean code = better code". So why do sites like Mobile Me and Google and Facebook all use huge amounts of tables and other not-semantically correct code? Thanks! ...

Do you use microformats in your web projects?

Do you use microformats in your web projects? If yes then why? If no then why? If yes then for which things do you use? Is there any alternate of microformats in HTML 5 ? I haven't used microformats yet. Should i start to use now or not much need? ...

XHTML 1.0 Transitive, is there a tool that can refactor HTML?

I have a Asp.net web application running with the following config setting. <xhtmlConformance mode="Legacy"/> This limits use of AJAX and compatibility with multiple browser. If my understanding is correct, the HTML code of the aspx pages need to be fixed to comply with XHTML 1.0 Transitional. There are alot of HTML pages, ~1000, i...

When is it OK to use Javascript and when not?

Is it good practice not to use much javascript/jquery? Should we avoid it as much as possible (for good accessibility)? When is it OK to use JavaScript and when is it not in web design and development? In what scenarios and with what conditions? Update: I'm asking regarding public websites. ...

How to add <li> using javascript?

I want to add one more li at last but using JavaScript/jQuery for example i want to add this li at last <li><a href="#header" >Back to top</a></li> <ul id="nav"> <li><a href="#nowhere" >Lorem</a></li> <li><a href="#nowhere" >Aliquam</a></li> <li><a href="#nowhere" >Morbi</a></li> <li><a href="#nowhere" >Praesent</a></li...

How to show hidden div when javascript is disabled?

I'm hiding a div using display:none and this div only shows when we click on + icon. but if JavaScript is disabled then I want to show that div by default on. How to do this? I can't post whole code for now. jQuery(document).ready(function() { jQuery('a#toggle').click(function() { jQuery('#map').slideToggle(400); return...

How do I convert this h:form into xhtml form

<h:form id="login"> Email: <h:inputText id="email" value="#{user.email}"/> <h:commandLink id="signupLink" value="signup" action="#{userManager.validate}"/> </h:form> To something like this: <form action="#{userManager.validate}"> Email: <input type="text" id="email" value="#{user.email}"/> <button type="submit" value=...

Are browsers permitted to render <li>s in any order?

As I understand the XML spec, the significance of the order of child elements is not guaranteed. XML parsers tend to keep child elements in the same order as they occur in the XML document, but they are under no obligation to do so. If that's so, then are browsers free to render the <li>s in an <ol> or an <ul> in a different order than ...