Just Ask Matt - Answers

Changing the Font & Style of Your H1 Tags

QUESTION: (Rhonda) I am having problems changing the font size of my H1text. Is this very important? If so, how do I go about changing it?

Changing the text and/or style of an H1 tag is simple in CSS.  It does not affect anything other than how the visitor sees it though (i.e., if you use a large font, it means nothing more than a smaller font, in SEO terms or how Google sees it).

You can change the H1 tag locally or in the CSS definition file.

If you want to change all of the H1 tag settings in your entire website, you would do this in the CSS file:

h1 {
font-size: 24px;
}

You would use the h1 tag as you normally would:
<h1>This is my H1 tag</h1>

You can define a class in the CSS file which allows you to define your new style whenever you wish anywhere on the site:

.h1style {
font-size: 24px;
}

You would add this class to your h1 tag, when you wish it:

<h1 class=”h1style”>This is my H1 Tag</h1>

* Remember to add the “.” when defining it in the CSS to classify it as a class.

Finally, you can do it locally using a style attribute (without the CSS file):

<h1 style=”font-size:24px;”>This is my H1 Tag</h1>

All of the above do the exact same thing.  Their use is based on how often you use the style and how you want it defined (whether globally or locally).

Also, remember you can add other styles to the same definition (like color):

<h1 style=”font-size:24px; color:red;”>This is my H1 Tag that is Red and 24px high</h1>

I find that being able to change the styles of my text for header and other standard tags to be quite invaluable!  Knowing a little bit of CSS can go a long way.  Give this a try!

The easiest thing to try first is the local definition using the style attribute. If this is working for you, consider creating or editing your own CSS file!

Good luck!  cheers…matt


Read Full Post >>
More Questions & Answers...
GOT A QUESTION?

Who is Behind Marketing Mind?

Matthew Bredel begin_of_the_skype_highlighting     end_of_the_skype_highlightingMy name is Matthew Bredel and as of March, 2007, I am a full-time, work-at-home internet marketer. For close to 10 years, I worked for a defense company which was an OK job, but I was so uninspired in life and frankly, I needed some more money. That is when I first discovered internet marketing! Now I admit that I didn't start making thousands in my first couple of months (in fact, I lost my shirt!), but I finally saw the "internet light"...

Read More about Matthew Bredel
GURU STUFF END -->

Share This Post...

Being able to customize the appearance of your URL can help with both conversation as well as simplicity. Personalized URL’s (especially with affiliate links) are growing in popularity! This little trick not only personalized the URL (also called a PURL), but simplifies it, too. (And it looks very cool!)

This is so cool and I just wanted to share this little trick with you today!

(Yes, this is geek-stuff and does require some technical know-how!)

This is what I want to do:

I want to take the subdomain of a URL and redirect it (using an htaccess file) to a php file as a variable.  Here is the example:

http://Mattie.recommends2.me

I want this to redirect to:

http://recommends2.me/index.php?affname=Mattie

By using the subdomain, I am able to do a few things:

  1. Personalize the link (called a PURL in affiliate marketing)
  2. Shorten the link
  3. Simplify the link

(And it looks and sounds cool!)

There are two things I needed to do to make this work:

1)  Create a DNS A Record for *.recommends2.me pointing to my own IP address.

Some systems may allow you to point to a generic 127.0.0.1 address, but with Pair Networks, I needed to assign recommends2.me a dedicated IP and point directly to that IP address.

Realize that your server company may do things differently.  Since my dedicated server is with Pair Networks, this is the set-up that is required.

Some servers may not allow for the wildcard (*) record and may require you to manually assign each subdomain. (That kind of sucks and this will not work!) With my Pair Networks configuration, I can create the subdomain in this virtual way without creating manual subdomains or additional A Records.

2)  Edit Your .htaccess file

From here, it is even easier!  Simply add the following lines of code to your htaccess file:

RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^(.+)\.recommends2\.me
RewriteRule .* http://recommends2.me/index.php?affname=%1 [L,R]

Few things to point out above:

  • The first conditions specifies to ignore the redirect if the URL starts with “www”, like http://www.recommends2.me.
  • The second condition is grabbing the subdomain as a variable.
  • The final line is the actual rewrite where the subdomain variable is assigned as a php variable (%1).
  • Do NOT put parentheses () around the .* in the RewriteRule!
  • Be sure to replace recommends2.me with your own URL!

That is it!  From here, you can use a standard PHP $_GET variable to retrieve the data.  Try it out yourself and see what you think:

http://Mattie.recommends2.me

(This specific variable “Mattie” is a test case.  Other variables here will redirect to other sites.)

Cheers…matt

Don't Buy Another Money Making Product Until You Watch These FREE Videos!

First Name:
Email:

2 Responses to “PURL Wisdom - Using Your Subdomain as a Variable”

  1. This also works great for sending mail to your own list, and creating “personalized” Sales pages.

    E.G. “Hey Steve, check this out. I put together a special review page for you to learn about these awesome blue widgets!

    “http://Steve.bluewidgets.com”

    Then you just add php to the page that pulls the GET variable from the URL

    <! —- $name = $GET['affname'];

    Hi

    Check out these awesome blue widgets….

    —!>


  2. Hey Buddy! Good to hear from ya! And YES, personalized URLs (or PURLS) work GREAT with physical mail (both from from a trust as well as a conversion stand-point…plus, it is a lot easier to remember! cheers…matt

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>