Difference between SRC and HREF

The SRC and HREF attributes are used to include some external entities like an image, a CSS file, a HTML file, any other web page or a JavaScript file. Is there a clear differentiation between SRC and HREF? Where or when to use SRC or HREF? I think they can’t be used interchangeably. I’m giving … Read more

What to do Regular expression pattern doesn’t match anywhere in string?

I am trying to match <input> type “hidden” fields using this pattern: /<input type=”hidden” name=”([^”]*?)” value=”([^”]*?)” />/ This is sample form data: <input type=”hidden” name=”SaveRequired” value=”False” /><input type=”hidden” name=”__VIEWSTATE1″ value=”1H4sIAAtzrkX7QfL5VEGj6nGi+nP” /><input type=”hidden” name=”__VIEWSTATE2″ value=”0351118MK” /><input type=”hidden” name=”__VIEWSTATE3″ value=”ZVVV91yjY” /><input type=”hidden” name=”__VIEWSTATE0″ value=”3″ /><input type=”hidden” name=”__VIEWSTATE” value=”” /><input type=”hidden” name=”__VIEWSTATE” value=”” /> But I am not … Read more

What are all the valid self-closing elements in XHTML (as implemented by the major browsers)?

What are all the valid self-closing elements (e.g. <br/>) in XHTML (as implemented by the major browsers)? I know that XHTML technically allows any element to be self-closed, but I’m looking for a list of those elements supported by all major browsers. See http://dusan.fora.si/blog/self-closing-tags for examples of some problems caused by self-closing elements such as … Read more