Skip to main content

Jim Byrne Accessible Website Design Glasgow for The Third Sector, Voluntary, Charities and Not for Profits

Accessible, Responsive Website Design
Jim Byrne Web Designer

Make your pages validate when they include urls with ampersands (&’s) in them

At some point you will run your web page through the W3C validator and get the error, “unknown entity section”; due to the presence of ampersands (&’s) in page link urls.

The validator assumes that this is an error because it expects an ampersand to be the beginning of an entity.

I had this very problem myself when creating the weblog links for my own CMS. For me the solution was simple; I just get the CMS script to turn all ampersands into their equivalent entities.

Unfortunately it is slightly more work to manually replace all ampersands in a page, but if you want your page to validate it is a chore you will need to attend to:

For all urls in web pages that contain ampersands, i.e., replace each ampersand (&) in urls embedded within your pages, with the equivalent entity & , e.g.,

http://www.mcu.org.uk/showlog.php?weblogid=74&contentid=1

Needs to be modified to,

http://www.mcu.org.uk/showlog.php?weblogid=74&contentid=1

Another validation problems solved.

Take my Web Accessibility Online Training Course - WCAG 2.1 Compliance

Learn to design and manage WCAG compliant, accessible websites with my online course

You will learn both the techniques of accessible website design and an entire ‘framework for thinking about the subject’. It will equip you with the skills to understand, identify and fix issues any accessibility issues you come across. Watch the free videos to get a taste of what is on the course. Video image from Web Accessibility Online Training Course - WCAG 2.1 Compliance

Related content

Related content

View a list of all blog posts.

Written by :

Avatar of JamesByrne

Let's Chat

07810 098 119

Alternative access to client feedback ››

“The audit was extremely comprehensive, clear and demonstrated Jim’s expertise in the area of accessible web design.” Peter Madden, Project Manager, Sealed Envelope Ltd