Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

H1 / H2 in CSS


Guest

Recommended Posts

Hi all,

I would like to use the <h2></h2> with the stylesheet but don't know how to do this.....the stylesheet tag is:

TD.pageHeading, DIV.pageHeading {

font-family: Verdana, Arial, sans-serif;

font-size: 20px;

font-weight: bold;

color: #ff9900;

}

 

Anybody can show me how to do this?

 

latersssssss,

 

Chris

Link to comment
Share on other sites

Sorry, don't understand why you would want to use those old <h> type html tags when you can define the exact size of the font in points or pixels using css. If you want to use the <h> command on the page then you can use it as normal html.

 

Vger

Link to comment
Share on other sites

It is just the following.

h1 { 
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
 color: #005db6;
}

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

thanks Jack,

I now have:

TD.pageHeading, DIV.pageHeading h1{

font-family: Verdana, Arial, sans-serif;

color: #ff9900;

}

 

I removed the size things because I thought the H1 is big enough. Though when I look at it online it's still rather small..........?? Now when I go to the page there also isn't the H1................ :-"

 

now how to use the H1/H2 in the CSS??????

latersssss,

Chris

Link to comment
Share on other sites

or should I hardcode it.........? the code is:

<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

 

it is from product_info.php, but then again how??

 

Thanks in advance!

latersssss,

Chris

Link to comment
Share on other sites

Most major search engines now penalise people who use bold text and all-catitalised letters. The bold text, capital letters thing is so out of date as far as search engines are concerned.

 

Vger

because bether ranking within the search engines............now do you know how?

latersssssss,

Chris

Link to comment
Share on other sites

The purpose for using the h1 tag, other than drawing attention to an item, is for SEO purposes, as you mentioned. But SE's can't see css code so adding a class defeats the purpose. Add it as I show above and then just use

<td valign="top"><h1><?php echo $products_name; ?></h1></td>

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

O.K. <Hn> can have class selectors, therefore this is ligit source-code

 

<td valign="top"><h1 class="ProdName"><?php echo $products_name; ?></h1></td>

 

Basic:

.ProdName {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;}

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

You can do it that way but it doesn't gain you anything that I can see. It also serves to increase the size of the css file which is already too large.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

You can do it that way but it doesn't gain you anything that I can see.  It also serves to increase the size of the css file which is already too large.

 

Jack

[sE hype]

 

The question was how to do it :D

Whether it has any pos. influence on SE's (or his sales/margin/profit?) is up to Chris to decide.

The size of the stylesheet is depending on the (table-layout) design and the sizes/dimensions and images/colors as well as the amount of text differently displayed the designer wants to see, not much you can do about it, apart from stripping all that's not strictly neccessary.

 

On the other hand, once downloaded the CSS is there in the cache for the browser to use on the other pages.

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

Well, the question was actually how to do in order to get better SE results. Using h1 and bold tags is a known method and should be employed by everyone. So using a td.class is out of the question. That means you have to use the h1 tag in the code. So I'm just saying I don't understand what using <h1 class==someclass> will gain you over <h1>.

 

At the same time, page load times cannot be ignored. If your css file size is 1K it loads a little faster than if it is 200K. Adding the one change you mention won't make a diffecernce. But then the next contribution says to "add this to the css file" and before you know it the size is too large. Run your site through a tester such as this one if you haven't already. You may be surprised at the sizes of your files. Granted, as you say, the file is cached, but that initial load, if too slow, will lose potetnial customers.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Well, the question was actually how to do in order to get better SE results.  Using h1 and bold tags is a known method and should be employed by everyone.  So using a td.class is out of the question.  That means you have to use the h1 tag in the code.  So I'm just saying I don't understand what using <h1 class==someclass> will gain you over <h1>.

 

At the same time, page load times cannot be ignored.  If your css file size is 1K it loads a little faster than if it is 200K.  Adding the one change you mention won't make a diffecernce. But then the next contribution says to "add this to the css file" and before you know it the size is too large. Run your site through a tester such as this one if you haven't already.  You may be surprised at the sizes of your files. Granted, as you say, the file is cached, but that initial load, if too slow, will lose potetnial customers.

 

Jack

 

Hmm, well the question i answered was a different one:

I would like to use the <h2></h2> with the stylesheet but don't know how to do this

The advantage of <Hn class==someclass> over <Hn> is obvious i think, it will give OP e.g. the opportunity to adapt the <Hn> size of $products_name to an acceptable level compared with the rest of the font-size on the page.

 

What should be in or not be in the class is for the OP, my own opninions are not part of OP's question.

 

And whether the modification in question or anything else for that matter influence OP's SEO-results; there are thousands of documents and posts for anyone to read, all with different or the same ideas and more or less convincing arguments or/and beliefs regarding existing and new sites.

 

FYI, im 'happy that you agree that page load time for a simple textfile only is peanuts compared to a whole site full of for example non-optimized, sometimes even buggy, sourcecode and images.

 

And as long as one knows what one is doing one should not be surprised by the size of files, and after so many years i'm not that easily surprised :D

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...