We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Getting rid of H1 default css.

cstormer asked
Medium Priority
Last Modified: 2009-07-29
How do I get rid of H1 default text?

Towrd teh bottom of the page there is a paragraph I'm playing with.. it has an h1 tag right in the middle, how would I make that text just fall in line in the paragraph, keeping the same look as the paragraph and also keeping the h1 tag on the selected text?

Watch Question

Top Expert 2004
I am not too sure why this disrupts the style after the <h1> tag, but as a block element (I think it's block, correct me if I'm wrong), you can always add style="display:inline;" to it to make it continue on the line.

As for disrupting the style, the only solution I can think of is maybe putting your font size on a span tag and have it both before and after the <h1> tag.

Another probably better option is just to use a span tag and stylize your own h1 tag.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


I am actually styling the h1 tag.. (the last line of the css..)
Top Expert 2004

Ah, I didn't see that, but in your case, it's even more logical to do away with the h1 tag and just style a class for a span tag with the same styles as well.


Zylock,  I need to get teh H1 in there for other purposes ;)
Top Expert 2004


You could split up the paragraph styling with <span> tags like I suggested, have <span> tag wrappers both for text before <h1> tag and after as well.


pretty much, ya ok i'll try that a little later .. is there a way to strip all default css from a tag?
Top Expert 2004

I do not know of anyway to do this. Usually, when this functionality is needed, classes are used for the rest of the document and the tag that need not have styles remain unclassed.

Enclose the last para text inside <div> tags.

Use it as follows,

<div class="maintext">
  <p align="left">Versa Products Inc. is a manufacture of high quality computer tables, computer desks and computer lab furniture for a variety of environments ranging from schools to private training facilities.  We specialize computer tables that are adjustable and fixed height enclosed computer desks for the school&#160;<H1>computer furniture</H1>&#160;market.  All of our computer tables are designed specifically for a classroom environment. Each table is built only from high quality materials that make them the perfect classroom computer furniture.  Computer tables that are used for as computer lab furniture must be both extremely reliable while also offering a variety of configurations something our school computer furniture excels at.  It is important when shopping for computer tables, computer desks and other computer lab furniture to look for a lifetime warranty like the one that is included with every product we product.  We also make enclosed computer desks which are non-adjustable but can be accessorized in a variety of ways.  Here at Versa Products we take pride in the high level of craftsmanship that goes into all aspects of our classroom computer furniture and we think it is important that our customers know when they purchase from us that they are getting school computer furniture they can depend on.

also, give inline stylesheet for <h1> as follows,

<style type="text/css">
font: arial 9px

This will solve the problem since we are making the whole para as a block using div and then applying style.

Regards - Shyam.


close..  but it seems like we have a line break before the computer furniture tag?
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.