How and when to use HTTP 301 redirects

When your browser client connects to a website over the Internet, it sends an HTTP request to that website for the information it is looking for. The website then responds with an HTTP status code to inform the client how it will deal with its request. The most common status code is 200, which means […]

Read More

Changing the text highlight colour with CSS

If you’ve seen websites display different foreground or background colours on highlighted text and wonder how they do it, it’s actually very simple. Once part of the draft CSS Selectors Level 3 specification ::selection overrides your browser-level or system-level text highlight color with a color of your choosing. Here’s an example: Note how the selectors are […]

Read More

Placeholder HTML 5 Attribute: Default text field values

Creating text fields with default values is now easy thanks to HTML 5. There is a new HTML attribute specifically just for this purpose – the placeholder attribute. As the descriptive attribute suggests, it allows you to create place holder text which is visible if the text field is empty. The attribute itself is supported […]

Read More

CSS 3 Linear Gradients

Creating linear gradients are extremely easy thanks to CSS 3. There is no longer any need to use background images, which not only saves on unnecessary network requests, but is also so much more convenient for us Web developers. As CSS gradients are relatively new to the scene, older versions of most Web browsers provided […]

Read More