Is it good practice to use [at] instead of @ and [dot] instead of . when posting an email address on your web site

Is it good practice to use [at] instead of @ and [dot] instead of . when posting an email address on your web site?


If your aim is to prevent Spammers from harvesting your email address, then apparently that is more effective that displaying the actual address. However, it won’t work with a mailto link.

This is a rather old article, but it gives a general overview of the relative effectiveness of various methods of email obfuscation.


I think I might do something like this.

<span style="color: red;"><b>yourname</span><span style="color: blue;">[at]</span><span style="color: red;">youremail</span><span style="color: blue;">[dot]</span><span style="color: red;">com</span></b>

Can you write that without putting your CSS within style attributes? In other words, separate the CSS from the HTML like this:

<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>asasass thinks, therefore he IS.</title>
    <style type="text/css">
/* your CSS here */

<p>Your HTML here</p>  <!-- Use appropriate elements, Not necessarily <p> tags -->


I suggest that for several reasons including because your code has an error.

1 Like

Can I do it this way?

<b><span style="color: #b45f06;">yourname</span><span style="color: #1155cc;">[at]</span><span style="color: #b45f06;">youremail</span><span style="color: #1155cc;">[dot]</span><span style="color: #b45f06;">com</span></b>

asasass, as you and I know, you will do whatever you want to do regardless of advice to the contrary. You do not need our permission or blessing (which is a good thing) to write poor quality code.

You did fix the validation error but you did not separate the HTML and CSS. The CSS is still within style attributes. Take it out. Connect the CSS to the HTML with classNames. You will have less CSS and simpler HTML.

You should be able to copy and paste the code directly into the body of your post without having to make an image first.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.