Showing posts with label Tip. Show all posts
Showing posts with label Tip. Show all posts

Thursday, October 27, 2011

Border TRouBLe, a CSS shorthand tip!

TRouBLe is a mnemonic, a learning aid... for CSS values for border, padding and margins

Instead of writing:

  • border-top-width: 2px;
  • border-right-width: 3px;
  • border-bottom-width:4px;
  • border-left-width:3px;

 

 

 

 

You can just write border-width: 2px 4px 6px 8px;

The order is Top, Right, Bottom, Left easily remembered with the word TRouBLe!

Also if you don't want the right side to have a  value at all, instead of writing 0px, don't add the unit, just write 0

For example:

border-width: 2px 0 6px 8px;

 

Monday, April 04, 2011

Week One - A Tip "Write a Good, and Unique Title <title></title> for EVERY web page!"

The W3C Quality Assurance Tips for Webmasters.

The Quality Assurance group has put together a list of items that make a "quality" web page.

At the top of the list is the "best" thing you can do to assure a high ranking by web search engines. The best thing? Write a good <title> for your web pages.
Here it is...

 

<title>: the most important element of a quality Web page
The <title> element in HTML is designed to provide a short piece of text that should stand for the document in cases such as:
• window title bars
• bookmark lists
• result lists from search services
A good title
So take care to give your page a good title:
not too short
"Section One" won't help much when it shows up in a search results list. Section one of what?. Better: <title>Section
One of the Modern Music Guide</title> or even better <title>Time Frame (the Modern Music Guide, Section 1)</title>
not too long
Because only 60 to 80 characters are displayed in many window titles, menus, etc.; you can give a more detailed/pleasant title in the top level heading of your document, e.g. <h1>Section One: When has the Modern Time Commenced, Musicwise?</h1> (with a link to the whole Modern Music Guide for context).

 

There are more tips, you'll find them here at The W3C Quality Assurance Tips for Webmasters website.