a[href*=”//”]:not([href*=”yourwebsite.com”]) { /* Apply style here */ } This CSS selector takes all a tags which href attribute contains two forward slashes (to filter out relative URLs) and which doesn’t contain the URL of your website. article