Different H1 tag on other pages

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Different H1 tag on other pages

Post by protectourlands » Sat Dec 28, 2019 5:09 pm

I have a H1 tag on my home page that does not work on the other website pages. Is there a way to assign a different H1 style to text on other pages within the same project?

User avatar
Pablo
 
Posts: 21430
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Different H1 tag on other pages

Post by Pablo » Sat Dec 28, 2019 6:07 pm

The H1 style is global for all pages.
But you can use the 'Heading' object to have different heading styles.

User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Different H1 tag on other pages

Post by protectourlands » Sun Dec 29, 2019 4:46 pm

Thank you Pablo. I was hoping there was a way to overwrite the generated h1 style for other pages with a separate CSS file. I think I'm going to have to split the project into 2 wb files.

User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Different H1 tag on other pages

Post by protectourlands » Sun Dec 29, 2019 5:20 pm

Can't I write a new style for h1 and place it in the page html? WB will generate the tag for that text, and the embedded style will overwrite the style generated in the sheet?

ex

Code: Select all

<style>
h1 {
   background-color: #FFFFFF;
   color: #000000;
   display: inline;
   font-family: "Varela Round";
   font-size: 43px;
   font-weight: bold;
   margin: 0px 0px 0px 0px;
   padding: 0px 0px 0px 0px;
   text-decoration: none;
}
</style>

User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Different H1 tag on other pages

Post by protectourlands » Sun Dec 29, 2019 6:32 pm

I tried it 2 ways. I added style tags and placed the new style code after the body tag in page html. I also tried writing a new css file, using file publisher, and calling on it in the head tag. Both worked.

Since most of the new style was redundant, I only wrote the replacement h1 style to include the changed values of text color and background. This way the font size is rendered properly in the breakpoints where it changes and not globally over-written.

I tested this in FF, Chrome, and Edge. Do you see any issues with doing this?

User avatar
Pablo
 
Posts: 21430
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Different H1 tag on other pages

Post by Pablo » Sun Dec 29, 2019 9:39 pm

You can also define custom heading styles in the Style Manager.

Related tutorial:
http://wysiwygwebbuilder.com/style_manager.html

User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Different H1 tag on other pages

Post by protectourlands » Sun Dec 29, 2019 10:07 pm

The problem is, the text has to be tagged h1. Are you saying there can be more than one h1 style in the manager?

User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Different H1 tag on other pages

Post by protectourlands » Sun Dec 29, 2019 10:36 pm

I tried to build more than one h1 style in the manager and it cannot be done.

I probably didn't explain this clearly. I need to tag all of the page headings h1. The problem is some of the backgrounds change from white to black. So I need to have some pages with h1 tagged text have the text colored. On other pages I need the h1 tagged text to be white.

My solution was to tag all the headings on a majority of the pages with h1. Then on the few pages where I needed the color inverted, I called on a new style sheet in the head code that changes the text color. WB still writes the text with the h1 tag, but the browser styles the text color to the new style. It works in all my tests, but I have concerns Google will view the text color change as an attempt to hide text, or that it is not W3C compliant to do this.

User avatar
Pablo
 
Posts: 21430
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Different H1 tag on other pages

Post by Pablo » Mon Dec 30, 2019 7:40 am

You can defined multiple <h1> tags in the style manager.

Related tutorial:
http://wysiwygwebbuilder.com/style_manager.html

lummis
 
 
Posts: 142
Joined: Sun Apr 24, 2011 9:18 am
Location: UK

Re: Different H1 tag on other pages

Post by lummis » Mon Dec 30, 2019 12:05 pm

Just to expand on Pablo's reply, you need to copy the H1 style then make the changes and give it a new style name. When published it retains the H1 tag.

Brian

User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Different H1 tag on other pages

Post by protectourlands » Mon Dec 30, 2019 4:12 pm

Thank you Pablo and Brian. I see that but It does however write the copied version as a class.

Code: Select all

 <h1>text</h1>
vs

Code: Select all

<h1 class="newheading">text </h1>
I don't think my client will accept this. They want to see <h1>. I'll check. Thank you both

Happy New Year

User avatar
Pablo
 
Posts: 21430
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Different H1 tag on other pages

Post by Pablo » Mon Dec 30, 2019 4:35 pm

There is no way to have difference heading styles without a class attribute.
Obviously this does not affect SEO.

User avatar
protectourlands
 
 
Posts: 513
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Different H1 tag on other pages

Post by protectourlands » Mon Dec 30, 2019 5:08 pm

But that is exactly what I was able to do. The home page h1 is different than the about us page h1 - same project. I used the same h1 from the style manager but on the home page I changed the text color and background color in a separate css file that is called on from the head code.

I appreciate all your advise here. Everything worked out great and I learned a few more WB tricks as well.

Thank you for an amazing product Pablo. Happy New Year!

Post Reply