html

Previewing HTML in Java

What libraries/methods that you know of can do some basic HTML representation in Swing? Can you comment on your experience? ...

What HTML parsing libraries do you recommend in Java

I want to parse some HTML in order to find the values of some attributes/tags etc. What HTML parsers do you recommend? Any pros and cons? ...

Limitations of screen readers.

I'm a web developer, and I want to make the web sites I develop more accessible to those using screen readers. What limitations do screen readers have that I should be most aware of, and what can I do to avoid hitting these limitations. This question was sparked by reading another question about non-image based captchas. In there, a c...

Keeping key value pairs together in HTML <select/> with JQuery?

Given a select with multiple option's in JQuery. $select = $("<select></select>"); $select.append("<option>Jason</option>") //Key = 1 .append("<option>John</option>") //Key = 32 .append("<option>Paul</option>") //Key = 423 How should the key be stored and retrieved? The ID may be an OK place but would not be guaranteed...

DOM manipulation in PHP

I am looking for good methods of manipulating HTML in PHP. For example, the problem I'm currently have is dealing with malformed html. I am getting input that looks something like this: <div>This is some <b>text As you noticed, the html is missing closing tags. I could use regex or a XML Parser to solve this problem. However, it is l...

should websites expand on window resize?

I'm asking this question purely from a usability standpoint: Should a website expand/stretch to fill the viewing area when you resize a browser window? I know for sure there are the obvious cons: Wide columns of text are hard to read Writing html/css using percents can be a pain It makes you vulnerable to having your design stretched ...

Is there a simple way to make html textarea and input type text equally wide?

Is there a simple way of getting a HTML textarea and an input type="text" to render with (approximately) equal width (in pixels), that works in different browsers? A CSS/HTML solution would be brilliant. I would prefer not to have to use Javascript. Thanks /Erik ...

HTML Select Tag with black background - dropdown triangle is invisible in Firefox 3

I have the following HTML (note the CSS making the background black and text white) <html> <select id="opts" style="background-color: black; color: white;"> <option>first</option> <option>second</option> </select> </html> Safari is smart enough to make the small triangle that appears to the right of the text the same colo...

Regex to match all HTML tags except <p> and </p>

I need to match and remove all tags using a regular expression in Perl. I have the following: <\\??(?!p).+?> But this still matches with the closing </p> tag. Any hint on how to match with the closing tag as well? Note, this is being performed on xhtml. ...

How to submit a form when the return key is pressed?

Can someone please tell me how to submit an HTML form when the return key is pressed and if there are no buttons in the form? The submit button is not there. I am using a custom div instead of that. ...

Tables instead of DIVs

Under what conditions should you choose tables instead of DIVs in HTML coding? ...

Is there a html opposite to noscript

Is there a tag in html that will only display its content if JavaScript is enabled? I know noscript works the opposite way around, displaying its html content when JavaScript is turned off. but I would like to only display a form on a site if JavaScript is available, telling them why they cant use the form if they don't have it. The onl...

Fixed page layout in IE6

Header, footer and sidebars have fixed position. In the center a content area with both scroll bars. No outer scroll bars on the browser. I have a layout that works in IE7 and FF. I need to add IE6 support. How can I make this work? Here is an approximation of my current CSS. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//...

What is a reasonable length limit on person "Name" fields?

I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my database table where the field is varchar(50), but then I started to wonder. Is it more appropriate to use something like the Text column type or should I limit the ...

A WYSIWYG Markdown control for Windows Forms?

[We have a Windows Forms database front-end application that, among other things, can be used as a CMS; clients create the structure, fill it, and then use a ASP.NET WebForms-based site to present the results to publicly on the Web. For added flexibility, they are sometimes forced to input actual HTML markup right into a text field, whic...

Quick way to find a value in HTML (Java)

Using regex, how is the simplest way to fetch a websites HTML and find the value inside this tag (or any attribute's value for that matter): <html> <head> [snip] <meta name="generator" value="thevalue i'm looking for" /> [snip] ...

How to fetch HTML in Java

Without the use of any external library, what is the simplest way to fetch a website's HTML content into a String? ...

Best way to fetch an "unstandard" HTML tag

I'm trying to fetch some HTML from various blogs and I've noticed that different providers use the same tag in different ways. For example, here are two major providers that use the Generator differently: Blogger: <meta content='blogger' name='generator'/> (content first, name later and, yes, single quotes!) Wordpress: <meta name="gene...

Anyone have a diff algorithm for rendered HTML?

I'm interested in seeing a good diff algorithm, possibly in Javascript, for rendering a side-by-side diff of two HTML pages. The idea would be that the diff would show the differences of the rendered HTML. To clarify, I want to be able to see the side-by-side diffs as rendered output. So if I delete a paragraph, the side by side view wo...

Best way to export html to Word without having MS Word installed?

Is there a way to export a simple html page to Word (.doc format, not .docx) without having Microsoft Word installed? ...