tags:

views:

98

answers:

10
  <html>
  <tr>
  <td style="padding-left: 5px;padding-bottom:3px; font size="35;""> <b>Datum:</b><br/>
                            November 2010 </td>
  </html>

is my code correct? i would like to increase the font of the first line. Not sure if i have to put 2 "'s here. and it seems it didn't work.

+7  A: 
font-size:35px;

So like this:

<html>
  <tr>
  <td style="padding-left:5px;padding-bottom:3px;"> 
    <strong style="font-size:35px;">Datum:</strong>
    <br/>
    November 2010 
  </td>
  </tr>
</html>

Although inline styles are a bad practice and you should class things. Also you should use a <strong></strong> tag instead of <b></b>

jimplode
it didn't work? :-(
tintincute
Try that.... I missread your post, now the first line will be bigger than the second.
jimplode
It is worth pointing out the issues involved with using pixels for font size ( http://css-discuss.incutio.com/wiki/Using_Pixels ) and advising to use style sheets instead of style attributes. The advice for `<strong>` Vs `<b>` doesn't always hold, sometimes `font-weight` is a better choice than `<strong>`
David Dorward
http://www.jsfiddle.net/S78tH/ says it works.
Chris Shouts
@Christ Shouts: you left </tr> from the code..will try this one
tintincute
@tintincute - That same </tr> was missing from your original post.
Matt
@David Dorward: Using <strong> is still advisable over <b> for things like screen readers ect. And yes, controlling the amount of boldness should be done through styling.
jimplode
No, using strong when you want to say stronger emphasis is advisable. If you want bold text without that (which sometimes people do) then you don't want to be giving browsers (including screen readers) incorrect semantics.
David Dorward
That is what I meant!!
jimplode
A: 

Don't need to quote css attributes and you should specify an unit. (You should use an external css file too..!)

MatTheCat
A: 

Try this -

... font-size:35px ... 
Sachin Shanbhag
+1  A: 

you dont need those quotes

<td style="padding-left: 5px;padding-bottom:3px; font-size: 35px;"> <b>Datum:</b><br/>
                        November 2010 </td>
jknair
it didn't work :-(
tintincute
@tintincute - this should have worked. What exactly is it doing?
Spudley
@tintincute : this should have worked what kind do you get any kind of change ???
jknair
i copied it here and then paste in my code and run into my browser
tintincute
A: 

The correct CSS for setting font-size is "font-size: 35px". I.e.:

 <td style="padding-left: 5px; padding-bottom:3px; font size: 35px;">

Note that this sets the font size in pixels. You can also set it in *em*s or percentage. Learn more about fonts in CSS here: http://www.w3schools.com/css/css_font.asp

vetler
thanks but it's not working:-(
tintincute
sorry, the equal sign is still wrong.
Spudley
Oops, yes, the equal sign was wrong ... fixed now!
vetler
A: 

I suggest you use CSS instead, seems like you're going to repeat those lines later on. But to answer your question:

<html>
  <head>
  <style type="text/css">
    td.randname {
        padding-left: 5px;
        padding-bottom:3px;
        font-size:35px;
    }
  </style>
  </head>
  <body>
  <table>
  <tr>
  <td class="randname"> <b>Datum:</b><br/>
                            November 2010 </td></tr>
                            </table>
  </body>
</html>
Ruel
this didn't work:-(
tintincute
edited. That should work.
Ruel
will try this one
tintincute
+1  A: 

Try this:

<html>
  <table>
    <tr>
      <td style="padding-left: 5px;
                 padding-bottom: 3px;">
        <strong style="font-size: 35px;">Datum:</strong><br />
        November 2010 
      </td>
    </tr>
  </table>
</html>

Notice that I also included the table-tag, which you seem to have forgotten. This has to be included if you want this to appear as a table.

Good Samaritan
this code is also similar with others but this one it's working don't understand why
tintincute
It is because of the table-tag..:)
Good Samaritan
what do you mean "table-tag"?
tintincute
i just wanted to have the font size change in Datum, if i do this the "November" also follows
tintincute
Oh, I must have misread your question, I have now updated my answer.
Good Samaritan
in my code what is the table tag here?
tintincute
You forgot the table-tag in your code. It has to be included if you want the text to appear in a tablecell.
Good Samaritan
you mean <table> </table> this one?
tintincute
That's right, yes!:)
Good Samaritan
thanks now it's working. but my boss doesn't like the tables i built and they still preferred to leave it like that ;-)
tintincute
A: 
<html>        
    <table>
        <tr>
            <td style="padding-left: 5px;padding-bottom:3px; font-size:35px;"> <b>Datum:</b><br/>
            November 2010 </td>
    </table>
</html>
Monika
A: 

just write the css attributes in a proper manner i.e font-size:35px;

Prateek
A: 

There are a couple of answers posted here that will give you the text effects you want, but...

The thing about tables is that they are organized collections of labels and data. Having both a label ("Datum") and the value that it labels in the same cell is oh so very wrong. The label should be in a <th> element, with the value in a <td> either in the same row or the same column (depending on the data arrangement you are trying to achieve). You can have <th> elements running either vertically or horizontally or both, but if you don't have heading cells (which is what <th> means), you don't have a table, you just have a meaningless grid of text. It would be preferable, too, to have a <caption> element to label the table as a whole (you don't have to display the caption, but it should be there for accessibility) and have a summary="blah blah blah" attribute in the table tag, again for accessibility. So your HTML should probably look a lot more like this:

<html>
  <head>
    <title>Test page with Table<title>
    <style type="text/css">
      th {
        font-size: 35px;
        font-weight: bold;
        padding-left: 5px;
        padding-bottom: 3px;
      }
    </style>
  </head>
  <body>
    <table id="table_1" summary="This table has both labels and values">
      <caption>Table of Stuff</caption>
      <tr>
        <th>Datum</th>
        <td>November 2010</td>
      </tr>
    </table>
  </body>
</html>

That may not be exactly what you want -- it's hard to tell whether November 2010 is a data point or a label from what you've posted, and "Datum" isn't a helpful label in any case. Play with it a bit, but make sure that when your table is finished it actually has some kind of semantic meaning. If it's not a real table of data, then don't use a <table> to lay it out.

Stan Rogers