Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Showing link URL on printed media

Featured Replies

I have decided to show the URLs for links when someone prints a page from my website and have CSS code that works fine to do this, but it causes my stylesheet for printed media to break the W3C CSS validation that I worked so hard to get. And I can't figure out how to make my code conform to the W3C standards.

 

The code I have been using in my stylesheet for printers is this :

/* Show URL */
a:link:after,
a:visited:after {
   content:" [" attr(href) "] ";
   }

Does anyone have CSS3 that will print the link URLs without breaking W3C standards?? Thanks for any suggestions.

 

 

  • Author

Thanks, BlueDreamer, an interesting suggestion. It wouldn't have occurred to me to try that.

 

Unfortunately ... I just now tried it on the fly and it elicited that same Parse Error from the validator that my original code caused. I have no idea why.

 

34 a[title]:after

Value Error : content Parse Error attr(title)

  • Author

Yes, I am inclined to agree. Torn between principle and practicality, I am considering just removing the W3C badges from my pages and leaving the CSS as it is. I'm sure that others have struggled with this kind of choice too. Thanks for your input.

Does anybody really care about those badges? Ask your friends if they even knows what those badges mean. I bet most of them won't even know who the W3C are.

Does anybody really care about those badges? Ask your friends if they even knows what those badges mean. I bet most of them won't even know who the W3C are.

 

I actually agree with this. Also the W3 CSS validator is horrible, I only pay attention to their HTML validator.

  • Author

Thanks, fisicx and rbrtsmith, and I agree. None of my "normal" friends know or care who the W3C is, but web developers know and (I think) should care. The W3C community has made a tremendous contribution to the development of the web, especially during the years of the browser wars (yeah, I am that old), but I expect it has been difficult for them to keep up with the technical changes brought by the present plethora of new devices. Still, for a bunch of volunteers they have made a huge difference in the way things are done, most for the better, I think. Just my opinion.

 

Having said that, I am still seriously considering removing the badges since my CSS is not strictly compliant (for print media). Like you, rbrtsmith, I am more concerned about the html (which is compliant).

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.