Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


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.


Related HTML, JavaScript and Web Site Programming articles:
✔   How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔   Can I embed a Facebook search box on my blog site?
I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔   Can I use CSS for drop shadows on my blog?
I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔   How can I embed interactive photo panoramas on my site/blog?
I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔   How can I create a Twitter search URL shortcut?
I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  









Reader Comments To Date: 1

amit agarwal said, on December 23, 2004 6:40 AM:

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

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

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

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











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 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. Further, 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. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.