?
Solved

making a table

Posted on 2007-04-07
7
Medium Priority
?
135 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
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…
Suggested Courses

765 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