Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Saturday, July 11, 2009

html for printer-friendly page

Found this great article on how to code HTML for printer-friendly pages, and it works!

Here's the important snippet on how to code the HTML for a printer-friendly button option:

If you also want to add a "Print this page" button your blog, add the following HTML snippent anywhere on the page.

[a href="javascript:window.print()"]Print Page[/a]

Remember that the above creates a printer friendly version only in memory and directly submits it to the printer. The user is not able to see the electronic version of the print version unless he prints it to PDF using Acrobat or other PDF creation tools.

If you want to build a functionality like The New York Times or Wall Street Journal paper where readers have an option to convert any HTML page into a text only version which can then either be printed or saved an HTML text file for offline reading, stay tuned for the next part of this tutorial. It involves HTML forms and query parameters.

Saturday, June 20, 2009

the mailto command & its html coding

Found this article on the About.com site. Perfect for a project I'm working right now for MFO!

THE MAILTO COMMAND

by Jennifer Kyrnin

If you want people to send you email from your Web page, you can use the "mailto" tag. Then, when your readers click on the link, an email browser opens up to allow them to send you email.

Setting up a Mailto Link

To write an email link just create an anchor link like you would normally, but instead of "http://" write "mailto:" and then your email address. For example, to set up a link to email me, you would write

If you want to send to multiple people, separate the email addresses with a comma:

But there is so much more that you can do with the mailto links. Most current Web browsers and email clients support more than just the "To" line. You can specify the Subject, send carbon copies, and blind carbon copies.

Advanced Mailto Links

When you create an email link with extra features, you treat it similarly to a CGI script that uses a GET operation (attributes on the command line). Use a question mark after the final "To" email address to indicate you want more than just a "To" line. Then you specify what other elements you would like:

  • cc - to send a carbon copy
  • bcc - to send a blind carbon copy
  • subject - for the subject line

You treat the elements as name=value pairs. The name is the element type listed above that you want to use, and the value is what you want to send. To send a letter to me and cc the Web Design Guide, you would type:
Web Help

To add multiple elements, separate the second and subsequent elements with an ampersand (&).

Finally, when adding a subject, keep this in mind, while you can use spaces, they may not come to your email address as spaces. Well, technically they are, but they are sent as URL encoded spaces, so while your browser would know they are spaces, they look like code to you. It's better to separate your words with underlines rather than spaces, as this make it easy for you to read without worrying about how the browsers will interpret it:

Putting Mailtos Together

results in testing mailto.


Thursday, April 2, 2009

Tizag Tutorials


Found a great "school" for web designers today. Tizag Tutorials is your one-stop shop if you want to pick-up or polish your skills in HTML, CSS, PHP (where I am spending much time lately), or learn all about web hosting.

And best of all ... it's FREE!