Jump to content
Sign in to follow this  
chanchal

Reducing Font Size in H1 Tag

Recommended Posts

chanchal

Currently I am using following code in my custom code to reduce the font size.

.post-title h2 a{font-size:20px}
But its not SEO-friendly to use H2 tag instead of H1. What should i put there to keep the same font size but in H1 tag?

Share this post


Link to post
Share on other sites
chanchal

If I change the H2 to H1 on same code, Text size becomes larger. And after that changing font-size px value doesnt reflect any changes. :(

Share this post


Link to post
Share on other sites
catrina

You should add this instead:

h2.post-title {font-size:20px}

Change the px size accordingly.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
chanchal

But your code didnt use h1 tag......

Share this post


Link to post
Share on other sites
kastelic

You can't use CSS to change h2 tags to h1 tags on your page. You either have to hide the title tag with CSS (

display:none

) and then type in your own h1 titles in each posts' editor, or use javascript to replace every h2 tag with h1 tags.

Share this post


Link to post
Share on other sites
chanchal

How to do that? I am not an expert in HTML to do all these. I just want to use google friendly h1 tag. Because when scanning for SEO, it says there is no H1 tag used in my pages.

.post-title h2 a{font-size:20px}

I have used the above code to reduce the font size of the title. How to use H1 tag with smaller font sizes.

Share this post


Link to post
Share on other sites
catrina

If you want to replace the h2 tags, you will have to replace them with h1 tags (as Jimmy suggested) inside the files. Do you know where to find the files?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
chanchal

please suggest me some easy way. please guys

Share this post


Link to post
Share on other sites
catrina

That is the easiest work-around for it or if you want, you can use Javascript to replace the tags and we'll advise you from there.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
chanchal

Currently using without any custom code. And my post titles are become larger than life :) How to make them small without leaving them from h1 tag. Please suggest. Please.

Share this post


Link to post
Share on other sites
cmunns

What is the site url?

Share this post


Link to post
Share on other sites
catrina

Add this CSS code and change the number to the size you want:

div.post-title {font-size: #px;}


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
chanchal

Sorry Catrina, But code not working!

Share this post


Link to post
Share on other sites
cmunns

I'm unclear here. Are you trying to change h2 tags to h1? Or are you simply trying to reduce the size of both? Let's clarify

Share this post


Link to post
Share on other sites
chanchal

Dear Munns, Earlier I was using

.post-title h2 a{font-size:20px}

to reduce the font size of my post title, but as I realized that post title should me in h1 tag to improve the seo, i have removed the code from custom code section. Now my title again becomes large like before. Now i want to know that is there any other code which I can use to reduce the font size and also keep my post title on h1 tag. Hope the whole story is cleared now. Thanks, Chanchal.

Share this post


Link to post
Share on other sites
Kate

Hi Chanchal, I didn't read through all of the posts above. But, couldn't you just modify your code to use an h1? Something like this:

h1.post-title{font-size:20px;}

Share this post


Link to post
Share on other sites

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

Sign in to follow this  

×