Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
How best to wrap anchor tags around a product tile
-
Hi
Say I am on a Product Listing page on ecommerce website and I have product tiles which contain images and name/price underneath them. Is it better to wrap the whole product tile (image and name/price) in an anchor tag (linking to their product page) or to wrap the image and the name/price underneath in anchor tags separately (linking to the product page) ?
thanks
-
To wrap anchor tags around a product, you'll typically want to create a hyperlink that, when clicked, leads to a page or resource related to the product
-
A possible answer to this issue could be:
"To effectively wrap anchor tags around a product tile, you should ensure that the anchor tag encloses the entire content of the product tile. This can be done by placing the opening <a> tag at the start of the product tile and the closing </a> tag at the end of it. Here’s a step-by-step approach:
Start with the opening anchor tag before any of the product tile content. Add the href attribute to the anchor tag with the URL you want the user to be directed to when they click the product tile.
Ensure that the anchor tag has display block (display: block;) style applied to it, so it takes up the full tile space. This is important for making the whole area clickable.
Place all the HTML that makes up the product tile between the opening and closing anchor tags. This includes the image, product title, price, and any other information you wish to display.
Close the anchor tag after all the product tile content.
Remember to style the anchor tag to remove any default styling like underlines (text-decoration: none;) and ensure it inherits text colors (color: inherit;), so it blends seamlessly with your product tile design.Test the implementation across different browsers and devices to ensure the clickable area covers the entire tile consistently."
By wrapping the entire tile in an anchor tag and ensuring the tag is displayed as a block-level element, users will be able to click anywhere on the tile to navigate to the product's detail page.
-
To wrap anchor tags around a product tile effectively:
Use a parent container for the product tile.
Place the anchor tag within the container.
Ensure the anchor tag covers the entire product tile for accessibility.
Set the anchor's href attribute to the product's page URL.
This approach allows users to click anywhere on the product tile to access more details, improving user experience. -
It's generally better to wrap the whole product tile, including the image and name/price, in a single anchor tag. This approach provides a larger clickable area for users, improving the overall user experience and making it easier for them to access the product details.
.
.
.
( IT Business Analyst ) ( -
It's generally best to wrap the entire product tile in a single anchor tag for a larger clickable area and improved user experience on e-commerce product listings.
-
Hi,
In most cases, it's better to wrap the whole product tile (image and name/price) in a single anchor tag linking to the product page. This approach provides a larger clickable area and offers a better user experience, as visitors can click anywhere within the tile to access the product details. It simplifies navigation and ensures consistency in user expectations when interacting with product listings on an e-commerce website.
.
.
.
( Diploma Courses In Canada ) (Canada PR) (PMP Exam Prep)
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Unsolved Using NoIndex Tag instead of 410 Gone Code on Discontinued products?
Hello everyone, I am very new to SEO and I wanted to get some input & second opinions on a workaround I am planning to implement on our Shopify store. Any suggestions, thoughts, or insight you have are welcome & appreciated! For those who aren't aware, Shopify as a platform doesn't allow us to send a 410 Gone Code/Error under any circumstance. When you delete or archive a product/page, it becomes unavailable on the storefront. Unfortunately, the only thing Shopify natively allows me to do is set up a 301 redirect. So when we are forced to discontinue a product, customers currently get a 404 error when trying to go to that old URL. My planned workaround is to automatically detect when a product has been discontinued and add the NoIndex meta tag to the product page. The product page will stay up but be unavailable for purchase. I am also adjusting the LD+JSON to list the products availability as Discontinued instead of InStock/OutOfStock.
Technical SEO | | BakeryTech
Then I let the page sit for a few months so that crawlers have a chance to recrawl and remove the page from their indexes. I think that is how that works?
Once 3 or 6 months have passed, I plan on archiving the product followed by setting up a 301 redirect pointing to our internal search results page. The redirect will send the to search with a query aimed towards similar products. That should prevent people with open tabs, bookmarks and direct links to that page from receiving a 404 error. I do have Google Search Console setup and integrated with our site, but manually telling google to remove a page obviously only impacts their index. Will this work the way I think it will?
Will search engines remove the page from their indexes if I add the NoIndex meta tag after they have already been index?
Is there a better way I should implement this? P.S. For those wondering why I am not disallowing the page URL to the Robots.txt, Shopify won't allow me to call collection or product data from within the template that assembles the Robots.txt. So I can't automatically add product URLs to the list.0 -
Canonicalising a product with multiple variants
I am working with an ecommerce site and have encountered an issue I haven't come across before and would appreciate some advice on how to proceed. There are multiple variation products with one master product and then up to 20 or 30 variant products, the variation could be colour, size or both. The site has been set up to canonicalise all the variations to the master variant product, which I understand to be best practice. But, this is where the issue occurs, the master variant product URL 302 redirects to one of the variant product URLs. Example below. My question is, is this harmful to our SEO efforts? Would be be best to canonicalise to a preferred colour or size variation? EXAMPLE: Master variant product: www.example.co.uk/primary-category/product-123 Seeing this product on the page and clicking will 302 redirect to www.example/co.uk/primiary-category/product-123/colour-456 On page www.example/co.uk/primiary-category/product-123/colour-456 the canonical tag is www.example.co.uk/primary-category/product-123 Any help with this would be greatly appreciated.
On-Page Optimization | | SimonKenworthy0 -
What is the best tag to use for your Logo ?
Hi, I'm wondering what is the best tag to use on your logo. We're currently using h1 and i want to scrap that ASAP.
On-Page Optimization | | Alex.harvey.Cortex0 -
ALT tagging images with keyword. What is too much?
I was wondering about the best practices of ALT tags in images. Say if you have an eCommerce site and you're on a product page. This product page has 5 images of the same product (different images), should you give every image an Alt tag with the keyword for that page? Or, is that keyword stuffing, and it would actually be best practice be to provide alt tags on just one image?
On-Page Optimization | | John_Francis0 -
What's the best practice for handling duplicate content of product descriptions with a drop-shipper?
We write our own product descriptions for merchandise we sell on our website. However, we also work with drop-shippers, and some of them simply take our content and post it on their site (same photos, exact ad copy, etc...). I'm concerned that we'll loose the value of our content because Google will consider it duplicated. We don't want the value of our content undermined... What's the best practice for avoiding any problems with Google? Thanks, Adam
On-Page Optimization | | Adam-Perlman0 -
Contact Form On Homepage - Best Practices
How important is it to have a contact form on the homepage of a service-based business? I am trying to decide if having a form on front page will increase the number of people filling it out.
On-Page Optimization | | TheSEODR0 -
Are blank Product Review pages bad for SEO?
Hi there, I'm running a new e-commerce site (BoatOutfitters.com) and have a question about our product review pages. On our current campaign, we have a lot of duplicate page content errors. When we export the data, it's almost all blank product review pages (since we are new, we don't have that many product reviews yet). Our product reviews aren't run through javascript, so we originally did not add them to a robots.txt file - however, I'm now wondering if it's worse to have all of these duplicate blank pages, or is it not affecting our SEO at all? Should we just wait until these products have reviews which will benefit our SEO and then they won't be considered "duplicate pages" - right? Sorry if this has been answered before - new here at SEO Moz and just looking for some help. Thanks!
On-Page Optimization | | BoatOutfitters0