[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

making a table

Posted on 2007-04-07
7
Medium Priority
?
137 Views
Last Modified: 2010-04-09
Hi,

Can someone write a small html compliant example. I just want some arial text and a small table:

Sentence one
Sentence two (red font)

Col1    Col 2   Col3   Col4
-------------------------------
x      |     y     |   z    |     ?
------------------------------
x      |     y     |   z    |     ?
------------------------------

That's all I need.

Thanks
0
Comment
Question by:DJ_AM_Juicebox
  • 3
  • 2
  • 2
7 Comments
 
LVL 9

Expert Comment

by:fuzzboxer
ID: 18870170
This is pretty simple to do, but here you go anyways:

<table>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
<th>Col4</th>
</tr>
<tr>
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
<tr>
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
</table>
0
 

Author Comment

by:DJ_AM_Juicebox
ID: 18870181
Yeah sorry I'm in a rush and have little html experience. What's the correct header I need for the page, don't I need something like:

<html>
<body>
    stuff you posted....
</body>
</html>
0
 
LVL 9

Expert Comment

by:fuzzboxer
ID: 18870192
Oh you need the entire page?  Yea, what you posted should get the job done.  It's simple, but a good place to start learning.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:DJ_AM_Juicebox
ID: 18870222
last simple thing - how do I get a 1 pixel wide line between the rows and columns?
0
 
LVL 9

Expert Comment

by:fuzzboxer
ID: 18870606
There are a couple of different options.  One is to use CSS which is a way to centralize all of your formatting changes.  Another is to apply the formatting directly to the elements.  Here is the second way:

<table border="1">
<tr bordercolor="#000000">
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
<th>Col4</th>
</tr>
<tr bordercolor="#000000">
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
<tr bordercolor="#000000">
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
</table>
0
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 18871500
TRY THIS........... With cool formatting, which you can use it throughout your site

<html>
<head>
<title></title>
<style type="text/css">
<!--
.tbl {
      background-color: f4f4f4;
      border: 1px solid #4f4f4f;
}
.txt1 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: normal;
      color: #000000;
}
.txt2 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #FF0000;
}
.txt3 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #000000;
}
-->
</style>
</head>

<body>
<p class="txt1">Sentence One</p>
<p class="txt2">Sentence Two(Red Font)</p>
<table width="400" border="0" cellpadding="5" cellspacing="1" class="tbl">
  <tr>
    <td align="center" class="txt3">Col1</td>
    <td align="center" class="txt3">Col2</td>
    <td align="center" class="txt3">Col3</td>
    <td align="center" class="txt3">Col4</td>
  </tr>
  <tr>
    <td align="center" class="txt1">x</td>
    <td align="center" class="txt1">y</td>
    <td align="center" class="txt1">z</td>
    <td align="center" class="txt1">?</td>
  </tr>
  <tr>
    <td align="center" class="txt1">x</td>
    <td align="center" class="txt1">y</td>
    <td align="center" class="txt1">z</td>
    <td align="center" class="txt1">?</td>
  </tr>
</table>
</body>
</html>
0
 
LVL 8

Accepted Solution

by:
jawahar_prasad earned 2000 total points
ID: 18871515
Hi.. You asked for lines between rows and columns... here it is..(the new code)
(Just copy paste, and execute the code)       :-)

<html>
<head>
<title></title>
<style type="text/css">
<!--
.tbl {
      background-color: 4f4f4f;
}
.txt1 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: normal;
      color: #000000;
}
.txt2 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #FF0000;
}
.tblheader {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #000000;
      background-color: #FFFFFF;
}
.tbltxt {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: normal;
      color: #000000;
      background-color: #FFFFFF;
}
-->
</style>
</head>

<body>
<p class="txt1">Sentence One</p>
<p class="txt2">Sentence Two(Red Font)</p>
<table width="400" border="0" cellpadding="5" cellspacing="1" class="tbl">
  <tr>
    <td align="center" class="tblheader">Col1</td>
    <td align="center" class="tblheader">Col2</td>
    <td align="center" class="tblheader">Col3</td>
    <td align="center" class="tblheader">Col4</td>
  </tr>
  <tr>
    <td align="center" class="tbltxt">x</td>
    <td align="center" class="tbltxt">y</td>
    <td align="center" class="tbltxt">z</td>
    <td align="center" class="tbltxt">?</td>
  </tr>
  <tr>
    <td align="center" class="tbltxt">x</td>
    <td align="center" class="tbltxt">y</td>
    <td align="center" class="tbltxt">z</td>
    <td align="center" class="tbltxt">?</td>
  </tr>
</table>
</body>
</html>
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question