Category: HTML And CSS

HTML and CSS tips and tricks

HTML (Hyper Text Markup Language) is the language behind the web pages of the Internet, created by Tim Berners-Lee, and uses a system of tags for applying layout, formatting and links to content. CSS (Cascading Style Sheets) are used to describe the presentation of the HTML. This section contains howtos, tips and tricks about how to use HTML and CSS.

Show the at symbol on mobile device on screen keyboard

If you’ve used a mobile device (e.g. iPhone, iPad, Android phone or tablet) to fill out web forms you’ll often find the @ symbol is present on the on-screen keyboard in email fields sometimes, but not always. Use type="email" instead of type="text" in the input field and it should show the at symbol on the on-screen keyboard.

Read More »

Use base target to target links instead of using Javascript

It’s easy to overlook the basics sometimes and be a clever dick with some overly complicated Javascript solution when there’s a nice easy HTML attribute that can solve the problem. In this post, I’m talking about the target attribute of the <base> tag which I suddenly had an "ohhhhh" moment with yesterday. There’s no need to use jQuery/Javascript to target links to _top, for example, just set the target in the base tag.

Read More »

Style the HTML hr tag with CSS

In the past I’ve fallen into the trap of creating a special class for rendering lines or separators in an HTML document and assigning the class to a div, ending up with something like <div class="line"></div> or something along those lines. Not only is this not semantic, it’s a whole bunch of extra unecessary HTML code which can be simplified by styling and using the often forgotten <hr> tag.

Read More »

Style HTML Anchor Titles with jQuery and CSS

The title property of anchor tags in HTML show the text in black on a yellow background by default in most browsers, after mousing over the anchor for a second or two. This tutorial will show you how to style the title with CSS using jQuery and a small amount of Javascript and it will appear as soon as the user mouses over the link.

Read More »

CSS3 rounded corner input

The CSS3 properties border-radius and box-shadow allow a designer to easily create rounded input boxes with pure HTML and CSS without having to resort to images. This post shows how it can be done and deals with vendor prefixes and other cross browser issues to ensure the input boxes work across all browsers.

Read More »