Center-align a HTML table

For your design, it is common practice to use divs rather than a table. This way, your layout will be more maintainable and changeable through proper styling. It does take some getting used to, but it will help you a ton in the long run and you will learn a lot about how styling works. … Read more

default select option as blank

Maybe this will be helpful — select an option — Will be displayed by default. But if you choose an option, you will not be able to select it back. You can also hide it using by adding an empty option <option style=”display:none”> so it won’t show up in the list anymore. Option 2 If you don’t … Read more

Which is better: or

Do you need a type attribute at all? If you’re using HTML5, no. Otherwise, yes. HTML 4.01 and XHTML 1.0 specifies the type attribute as required while HTML5 has it as optional, defaulting to text/javascript. HTML5 is now widely implemented, so if you use the HTML5 doctype, <script>…</script> is valid and a good choice. As to what should go in … Read more

Prevent line-break of span element

Put this in your CSS: Get more information here: http://www.w3.org/wiki/CSS/Properties/white-space white-space The white-space property declares how white space inside the element is handled. Values normal This value directs user agents to collapse sequences of white space, and break lines as necessary to fill line boxes. pre This value prevents user agents from collapsing sequences of white space. Lines are only … Read more