Tag Archives: HTML

Creating A Phone Number Input Control With Javascript

In this article I am going to show you how to create a cool phone number control in HTML using Javascript. Surely you have seen forms where you are asked to enter a phone number in three boxes – one … Read More »»»

Posted in Javascript | Tagged , , , , , , , , , , | Leave a comment

How to Allow Only Numbers in HTML TextBox Using Javascript

Sometimes you want to constrain what a user can enter in a textbox input on a page. This article shows you an easy way to do it with javascript and explains how it works. In short, you want to trap … Read More »»»

Posted in Javascript | Tagged , , , , , , , , , | 1 Comment

How to Implement a Superscript or Subscript Class with CSS

If you need to add a superscript or subscript text to your paragraph, you can surely use the <sup> and <sub> tags. There is one major problem with it – the line height. Look at the code below: <p> No … Read More »»»

Posted in CSS | Tagged , , , , , | Leave a comment

Using HTML5 Web Workers to Create Dedicated Threads in Javascript

What are Web Workers in HTML5? Web Workers are new feature in HTML5 allowing you to launch background threads in Javascript, a very useful feature if you need to perform some CPU intensive tasks. Normally, Javascript will execute all the … Read More »»»

Posted in HTML5 | Tagged , , , , , , , , , , | 2 Comments

Using HTML5 Canvas to Draw Simple Shapes

You should now have an understanding of what a <canvas> tag is in HTML5. So, let’s start with drawing some simple shapes. Whenever you need to draw on your canvas, you need to obtain the canvas context first. The context … Read More »»»

Posted in HTML5 | Tagged , , , , , , , , , , , | Leave a comment

What is the Difference Between Canvas and Svg Tags and Which One Should I Use?

The two new tags introduced in HTML5 are <canvas> and <svg>, the latter standing for Scalable Vector Graphics. They both can allow you to create rich graphics on the page but what is the difference between them and which one … Read More »»»

Posted in HTML5 | Tagged , , , , , , , , | 1 Comment

How to Add a Shadow to Text Using CSS

Sometimes a well done shadow makes a huge difference in user experience. Shadows are cool and give a very nice look to the text on your website. They are extremely easy to implement via CSS3 as well, but don’t get … Read More »»»

Posted in CSS | Tagged , , , , , , , , | Leave a comment

Cool CSS3 Effects: Rotate a Block Element

Never has it been easier to rotate elements in HTML given the CSS3 standard. All it takes a few lines of CSS. As usual, different browsers have different rule names for it Let’s get a div to rotate itself 15°. … Read More »»»

Posted in CSS | Tagged , , , , , , , , , | Leave a comment

Centering a Div on the Page, Vertically and Horizontally, So That It Is Always in the Center Independent on Browser Window Size

I am sure you at some point wanted to center a <div> element (or, perhaps, an image or some other HTML element) in the browser content area. While positioning it horizontally is easy, just a matter of setting your left-margin … Read More »»»

Posted in HTML | Tagged , , , , , , , | 1 Comment

Create a Page With a Header, Content and Footer That Span 100% Height in the Browser

Surely you have seen pages that span 100% height of your browser’s canvas area, even though the content may be just a line or two. If you are still wondering how to do this, here’s you complete guide, although without … Read More »»»

Posted in CSS, HTML | Tagged , , , , , , , , | 6 Comments