Jump to content
henrycr

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

Thanks Sergey for your help but unfortunately I do not understand what you mean, if you take my items and I must say so please be

Share this post


Link to post
Share on other sites

henrycr ..you should not use <a> tag inside the <h> tag..in your code when you were using <a> tag, it was creating problem and in the second code you don't use it so it's doing well..

Share this post


Link to post
Share on other sites

if so I put the h1 header page that I was out of position?

 

 

<h1>Tienda en Costa Rica-Celulares-Laptops-Perfumes-Relojes</h1>

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

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

Dear Cole001,

 

Thanks for response. But actually I wish to auto set Font and font size for H1, H2 tags. So do you have any idea about it?

 

Regards

Share this post


Link to post
Share on other sites

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

Hi,

 

But it not set any font or font size. No one know how to auto set it?

 

Thanks

Share this post


Link to post
Share on other sites

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

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

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

 

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

Yes that looks alright. class is the used CSS for styling and itemprop the meta tag for search engines.

Share this post


Link to post
Share on other sites
13 hours ago, JBW said:

Yes that looks alright. class is the used CSS for styling and itemprop the meta tag for search engines.

Thanks sir about your help :)

Share this post


Link to post
Share on other sites

I see only one H1 tag on the mentioned website, where do you find the second?

<h1 class="shik-cat">ماشین ظرفشویی</h1></div>

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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