SHARE
Facebook X Pinterest WhatsApp

So, You Want To Line Up Link Buttons, Huh?

Written By
thumbnail
Joe Burns
Joe Burns
Jan 4, 2005

Use these to jump around or read it all…



[Line ‘Em Up!]
[What Does It]

[What’s Happening]
[Ups and Downs]

[Can I Get A Picture On The Button?]

     “Yes, Joe. We’ve wanted to line up many different link buttons for a while now!”

     Yeah, you’re right. The old link button tutorial wasn’t overly helpful and many of you found that just throwing a bunch of links on the same page wouldn’t work real well. They all went to the same place. Now the answer has come, and I’m going to give it to you!



     In order to get the link buttons to line up and to have them all point at different places you need to separate the buttons. You have to make it so the other buttons don’t know that other buttons are around on the same page. Sounds real covert, huh? It’s a rather simple process, but it does get a bit involved. You separate the buttons using table commands. Read all about tables at your local library or visit my tutorial So, You Want A Table,
Huh?
. It’s good reading.


Line ‘Em Up!


     

Is this maybe what you

ve been looking for?












     Click on the buttons above. They all work and they all go to different pages.


What Does It


     

Why, this does it

now that you

ve asked:

<TABLE BORDER=”0″>

<TR>

<TD><FORM METHOD=”LINK” ACTION=”index.html”>

<INPUT TYPE=”submit” VALUE=”HTML Goodies Domain Page”>

</FORM></TD>

<TD><FORM METHOD=”LINK” ACTION=”http://espn.go.com”>

<INPUT TYPE=”submit” VALUE=”ESPN”>

</FORM></TD>

<TD><FORM METHOD=”LINK” ACTION=”http://www.cnn.com”>

<INPUT TYPE=”submit” VALUE=”CNN News”>

</FORM></TD>

</TR>

</TABLE>



What’s Happening


     

You

ll understand this a whole lot better if you first read the tutorial on

Tables

. It

ll help a great deal. But I digress

.


  • TABLE BORDER=”0″ tells the browser a table format will go here. The border=”0″ part is just telling the browser to place no defining lines around the cells you create.
  • TD stands for Table Data. It denotes the information that will go in the table. In this case, the data will be a form button.
  • FORM through /FORM is the form button explained in the Form Button tutorial.
  • /Table wraps up the whole deal.


Ups and Downs


     

A couple of additions and you get the buttons lined up and down:
















Here’s what did it.


Notice I just added a couple of <TR> and ALIGN=center commands. The ALIGN=center command is just my preference. You don’t need it for them to be up and down. They will just line up left-aligned without it.

<TABLE BORDER=”0″>


<TR>


<TD ALIGN=center><FORM METHOD=”LINK” ACTION=”/”>

<INPUT TYPE=”submit” VALUE=”HTML Goodies”>

</FORM></TD>


</TR>

<TR>


<TD ALIGN=center><FORM METHOD=”LINK” ACTION=”http://espn.go.com”>

<INPUT TYPE=”submit” VALUE=”ESPN”>

</FORM></TD>


</TR>

<TR>


<TD ALIGN=center><FORM METHOD=”LINK” ACTION=”http://www.perrier.com”>

<INPUT TYPE=”submit” VALUE=”Perrier Home Page”>

</FORM></TD>


</TR>


</TABLE>



      You can line the buttons up in just about any order allowed by the table commands. How they line up is not the real use of the table cells, although it helps a good deal. The real use of the table commands is to separate the buttons so they work apart from each other. Just enter the button’s commands as table data.


Can I Get A Picture on the Buttons?


     

No, I

m sorry to say. Not these buttons, at least. They are text-based and the image is created by the browser instead of being placed there as an image. Entering an image command or an image name simply shows up as the text you entered. Try it.

 


[Line ‘Em Up!]
[What Does It]

[What’s Happening]
[Ups and Downs]

[Can I Get A Picture On The Button?]

Recommended for you...

Guide to International SEO
How to Use the HTML a Tag
Project Management Tools for Web Developers
Enrique Corrales
Jun 20, 2022
Five Essential HTML5 Editors
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.