Welcome to WebmasterWorld Guest from 54.157.225.99

Forum Moderators: incrediBILL

Message Too Old, No Replies

<h1></h1> tags

     
12:33 pm on Dec 25, 2005 (gmt 0)

New User

10+ Year Member

joined:Nov 8, 2005
posts:12
votes: 0


Now all the titles of articles on my site have the following properties: font: bold 27px 'Tahoma'; color: #2A2A92. How can I insert the titles of these pages between <h1></h1> tags so that the properties described above do not change? The fragment of html-code to modify:

<style type="text/css">

<!--

.ts1 {font: bold 27px 'Tahoma'; color: #2A2A92}

-->

</style>

<span class="ts1">The title of the article</span>

Can you explain me what to do?

12:49 pm on Dec 25, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 30, 2004
posts:712
votes: 0


Something like this, maybe?


h1 {
margin:0;
padding:0;
font:bold 27px tahoma,verdana,sans-serif;
color:#2a2a92;
}

<h1>The title of the article</h1>

2:33 pm on Dec 25, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Oct 14, 2004
posts:319
votes: 0


Why specify margin and padding as 0 for a <h1>?
4:03 pm on Dec 25, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


In the above example, you can also just replace span with h1:

<h1 class="ts1">The title of the article</h1>

If you don't want the line break at all, then add display:inline to the rules.

Why specify margin and padding as 0 for a <h1>?

I often do that (well, I usually prefer a 4px margin) to avoid the sizeable gap between the header and the body copy. It gives a certain look that I prefer on many pages, visually associating the head and the copy more closely. This also makes for a bit more content above the fold.

4:42 pm on Dec 25, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Oct 14, 2004
posts:319
votes: 0


tedster, OK. FWIW, I am using

margin-top: 0;
margin-bottom: 0;
margin-left: .5em;

mostly at the moment - suits a lot of stuff I do right now. I just wondered if your settings had to do with an IE quirks thing that I didn't know about.

Happy Christmas to you.

7:32 am on Dec 26, 2005 (gmt 0)

New User

10+ Year Member

joined:Nov 8, 2005
posts:12
votes: 0


Thank you. Now how can I replace
<span class="ts1">The title of the article</span>
with
<h1>The title of the article</h1>
in DW for all pages on my site? Keep in mind that the articles' titles are different on different pages.
3:43 pm on Dec 26, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


How about doing it in two steps -- one batch replace for all the opening tags and then on for all the closing tags.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members