A static element usually refers to content that remains constant, and does not change in response to the user's actions or inputs on your website. These elements can be easily created using HTML and CSS code. For example, the product logo and navigation menu on the header and footer of your company's website are static elements.
On the other hand, a dynamic element is more functional and changes frequently based on the type of user interaction on your website, when or where your web page is accessed from, user preferences, devices used, etc. This not only uses HTML and CSS, but also includes scripting (server and client) to show content on your business website that changes dynamically. For example, the weather and temperature displayed on your website that changes based on the user’s location and the product description and price on an ecommerce site that changes based which product is being viewed.
Choosing the right method to edit static and dynamic content in a variation
Zoho PageSense does not recommend using the Edit HTML option for making changes to any dynamic content in your test variation, as this can break your web page. Instead, you can use the JS/CSS option to write custom Javascript code and apply the required changes to the dynamic content on your website. You can use the Edit HTML operation to edit your static content for testing.
Let's look at an example to understand the effect of editing the HTML of a dynamic element on a website: You own a SaaS business and you want to test the color of a CTA button that has personalized content for all new users landing on your web page: "Lucy, start your trail now!".
Here, the name "Lucy" (which is the username) changes dynamically based on the user's input and you decide to change the color of this button from green to blue using the editor's floating toolbar, or changing the CSS color property of the button without affecting this content.
This button will now be blue on all the web pages that are included in this variation of your A/B test.
However, if you replace the text with "Get started now, Lucy!", which contains the dynamically generated name "Lucy" that changes based on different users, then along with this piece of text, the entire text string will become static content.
That means every “<username>, Start your trail now!" button will instead read “Get started now, Lucy!” on all the web pages that are included in this variation of your A/B test, regardless of what the user inputs as their name.