themactep

a collection of miscellaneous projects of Paul Philippov

HTML Useful Tips

How to make a multi-line button

In HTML

<input type="submit" value="line1
line2">

In PHP

<?php
echo '<input type="submit" value="line1' + "\n" + 'line2">';
?>

In Javascript

<script>
document.write('<input type="submit" value="line1' + "\n" + 'line2">');
</script>

How to convert all tags and attributes to lower case with Vim

:%s/<\/\?\zs\(\a\+\)\ze[ >]/\L\1/g
:%s/\(<[^>]*\)\@<=\<\(\a*\)\ze=['"]/\L\2/g

from http://vim.wikia.com/wiki/Changing_all_HTML_tags_to_lowercase