Industry guru Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, Google AdSense, MySpace, Sony PSP, Apple iPod, Mp3 players, management, Linux, SEO, Mac OS X, Facebook, Twitter, LinkedIn and Microsoft Windows.

What are the essential HTML tags I need for blogging?

Dave, I've just started a weblog of my own and am finding that I need to learn a few HTML tags to make my entries as attractive as possible. I'd also like to learn how to link to other sites and other Weblogs, but really haven't much of a clue other than that HTML has < and > around different letters. Can you give me a quick primer?

Dave's Answer:

While most Weblog systems I've seen let you just type in your entries with blank lines and let it do the magic of transforming it into clean and valid HTML, you're right that to get the most out of your weblog writing, you'll need to learn a few basic HTML tags. Fortunately, it's easy.

The most important tag is the pair <p> and </p> which surround each paragraph of your input (I'm assuming that you don't want to use "convert line breaks" but want to have control over all facets of your entry formatting. If not, you can safely skip this particular tag). Rather than using blank lines, just use the common sequence of </p><p> between each paragraph, making sure to start with a <p> and end with a </p>, of course.

A few text formatting tags: to italicize something, use <i> and </i> around the words that you want italicized, as in this is in italics. To make something bold (or should I say bold?) use <b> and </b>. You can underline text, though you probably shouldn't so you don't confuse readers into thinking it's a hypertext link, with <u> and </u>.

The only other important HTML tag is a link, and that's a bit more complex because there are two pieces of data needed for a tag, the text that's shown on the page as clickable, and the address of the Web page where clicking will take you. So if I have a link like this: go to Yahoo! then I have two pieces of data, the words "go to Yahoo!" and the actual URL of the Yahoo Web page.

To take this nice and slow, let's start by looking at the general use of the "a" tag. To transform a word or words into a hypertext reference, surround it with <a> and </a>. Like this: <a>go to Yahoo!</a>. That's half of what we need, though, because while it indicates what words to highlight, it doesn't include the address of the page to which we'd like to point.

Not to worry though! To add the destination URL, you need to add what's called an attribute to the "a" tag, which is done by using a name=value pair. In this case, the name is href and the value, always surrounded by quotes, is the URL. Like this:

<a href="http://www.yahoo.com/">go to Yahoo!</a>

Now we've got a full hypertext reference that points to Yahoo. You can easily change the URL to anything else you want (you can even open up a new Web browser, surf to a page you'd like to reference, click in the address bar of the browser, then Select All and Copy. Flip back into the window within which you're writing your latest Weblog epistle and now Paste the URL of the desired page into your text, neatly tucked into the href section)

That covers about 95% of all the HTML I use in my Weblog entries here at Ask Dave Taylor. To learn more advanced HTML, including how to include images, how to work with CSS styles to fine-tune indentation, font-size, etc, and generally to learn the tremendous power of the HTML markup language, may I suggest my popular book Creating Cool Web Sites with HTML, XHTML and CSS?

If you have questions about other formatting effects for within a Weblog, please don't hesitate to respond to this with a comment and I'll answer as best I can.



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

Might want to add tags that are commonly used in the comments text area as well.

thanks.
amit @ http://labnol.blogspot.com

Posted by: amit agarwal at December 23, 2004 6:40 AM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Uniblue: Free Virus Scan

Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]