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...

Thanks WP 3.5 for the change! What do you do when you get the error: “Missing argument 2 for wpdb::prepare()”

Last Sunday, I was feeling pretty good about my plug-in and my new website over at TheWebReviewer.com.  Everything was running smoothly, most of my links where current.  The Google bots weren’t complaining too much.

Excellent!

Time to upgrade to Wordpress Version 3.5, right!

Damn.

So I did that and errors popped up all over the place:

Warning: Missing argument 2 for wpdb::prepare(), called in /home/blah/public_html/wp-content/plugins/reviewpress/blah/my.class.php on line 64 and defined in /home/blh/public_html/wp-includes/wp-db.php on line 990

That sucks.

Well, it seems like WP decided to add a new argument to the prepare() function of Wordpress.  (Why they just didn’t make it an optional parameter is beyond me.)  Anyway, it really wasn’t a big deal.

First, the prepare function (a part of the database class) is meant to handle escaping, quoting, and int-casting for SQL queries.  Its a good clean-up function.

The extra argument(s) are a “smarter” way of inserting variables into the SQL requests.  For example:

$wpdb->get_results($wpdb->prepare(’SELECT cat_id  FROM “$cat” WHERE pid = 1′));

would now become:

$wpdb->get_results($wpdb->prepare(”SELECT cat_id  FROM “%s” WHERE pid = 1″,$cat));

Note that the variable was redefined within the query as a data type and the variable is the second variable parameter.

In most of my cases, I define the query elsewhere:

$mysql = “SELECT cat_id FROM $cat WHERE pid = ‘1′”;

$catId = $wpdb->get_results($wpdb->prepare($mysql));  // BEFORE (Got the Error)

$catId =$wpdb->get_results($wpdb->prepare($mysql,0));  // AFTER (No Error)

Here, I just added a zero to the second argument and everything was happy.

(Still kind of a pain in my butt to go through all of my classes and fix!)

cheers…matt

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

First Name:
Email: