Jump to content

How edit H1 Tag


Recommended Posts

in product page you have h1

 

<h1 id="logo"><a href="http://www.kaiker.com" title="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes "><img src="http://www.kaiker.com/img/logo.jpg" alt="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes "><a></h1>

 

but it is used completely wrong.

To add changes to any page you can edit is appropriate .tpl file in /themes/your_theme

Share this post


Link to post
Share on other sites

- Celulares-Laptops-Perfumes-Relojes "><a>

Celulares-Laptops-Perfumes-Relojes "></a>

- Use the tag <a> inside the tag <h...> not a good practice, although allowed

- here is a set

h1 a img - img a h1

it makes no sense, nor to the SEO, or the user

Share this post


Link to post
Share on other sites

If I put it so it will be fine

 

<!-- Header -->

<div>

<h1 id="logo"><a href="http://www.kaiker.com/" title="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes"><img height="96" width="772" src="http://www.kaiker.com/img/logo.jpg" alt="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes "/></a><b>Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes</b></h1>

<div id="header">

Share this post


Link to post
Share on other sites

Do not worry, use img tags inside h1 - not an error. It's just senseless, compare

put this code in kaiker.html and open your browser

 

<h1 id="logo"><a href="http://www.kaiker.com/" title="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes "><img src="http://www.kaiker.com/img/logo.jpg" alt="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes "></a></h1>
<!-- no H1 variant -->
<a href="http://www.kaiker.com/" title="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes "><img src="http://www.kaiker.com/img/logo.jpg" alt="Kaiker - Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes "></a>

 

Wow! Both logos look the same - so why pay more? :D

Sorry, I do not know how else to explain

Share this post


Link to post
Share on other sites
  • 3 weeks later...

Hi,

 

Can anyone know how to set H1, H2, H3 size and font through css? So that while updating product if we only select H1 then automatically mentioned format will be applied to that name or title. Which will help in updating products and will save time in mentioning H1,H2 fonts and size.

 

Thanks

Vilas

Share this post


Link to post
Share on other sites

Dear SergeyH,

 

Thanks for details. But really sorry to say But I am unable to understand exactly what changes I have to do in my css. It will be great if you tell me in detail.

 

Thanks

Vilas

Share this post


Link to post
Share on other sites

Hello,

 

Thanks for prompt response. At which line I have to enter above script? Also what about H2, H3, H4? I wish to use Book Antiqua, Palatino Linotype font all over my site. So is that possible to autoset it?

 

Thanks

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...

Simple solution for no <h1> and no<h2> tags

1. Enable Home text editor module in BackOffice;

2. Click configure;

3. Write in Main title your <h1>text

4. Write in Subheading your <h2> text

 

Why does anyone tell this simple solution, without modifying any files? :blink:<_<

  • Like 2

Share this post


Link to post
Share on other sites
  • 6 months later...

OK, I battled with this issue too. This is what you need to do.

 

Go to themes/yourtheme/css/global.css

 

Open this file and find...

 

}
.rte h1,.rte h2,.rte h3,.rte h4,.rte h5,.rte h6,
.mceContentBody h1, .mceContentBody h2, .mceContentBody h3, .mceContentBody h4, .mceContentBody h5, .mceContentBody h6 {
margin: 0.75em 0 0.3em 0;
color: #374853
}
.rte h1,
.mceContentBody h1 {
font-size: 25px;
font-weight: bold;
background: inherit
}
.rte h2,
.mceContentBody h2 {
font-size: 12px;
font-weight: bold;
background: none;
text-transform: none;
height: auto
}
.rte h3, .mceContentBody h3 { font-size: 16px }
.rte h4, .mceContentBody h4 { font-size: 14px }
.rte h5,.mceContentBody h5 { font-size: 12px }
.rte h6, div.rte h6 { font-size: 8px }
.rte ol, .mceContentBody ul, div.rte ol, .mceContentBody ul { padding-left: 2em }
.rte ul, .mceContentBody ul {
list-style-type: square;
margin-left: 10px

 

There you can play with the look and feel of all your H tags and it will take effect in the editor in home page content for example.

Share this post


Link to post
Share on other sites
  • 7 years later...

Hi 

could you please help me How I can edit my product name tag and change it to H1

In my product pages I dont have H1  tags so I want to change the name of product to H1.

when I inspect the name and search in product.tpl I can not find the line that is related to this part.

please help me.

 

Share this post


Link to post
Share on other sites
1 hour ago, JBW said:

Search for {$product.name}

Thats how it looks inside product.tpl in 1.7.6. classic theme- h1 is already there

grafik.png.e4a4b33277a665bd3c8cb3fe908aa05a.png

 

Hi

thanks a lot about your useful help:

<div class="hrxproduct-detail-title" itemprop="name">{block name='page_title'}{$product.name}{/block}</div>

It is the line that I have in my template and I change it to

<h1 class="hrxproduct-detail-title" itemprop="name">{block name='page_title'}{$product.name}{/block}</h1>

Now when I inspect from the name of my product I see this part in H1 tag

<h1 class="hrxproduct-detail-title" itemprop="name">microwave model 876c</h1>

Is it right?

In some website I saw that they have only the name of product in H1 tag like:               <h1 microwave model 876c</h1>

So I wanted to be sure That it is OK?

Note that I edit this part in the folder of my template*(not classic)-product.tpl that had name line like this.

Regards and again thanks about your help

Share this post


Link to post
Share on other sites
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More