Jump to content

H1-h6 headings using css css


jimfog
 Share

Recommended Posts

Is there a way that i can give to a text, heading1-6 style using css?I am talking about the common h1-h6 html tags.Using css, is there a code that is the equivalent of the above tags?If for example i wish to make a sentence heading1 what css code i will use?I do not think there is such code.Or else, H1, with what point size is equal?I found this site here with relevant info:h tags info What do you think?

Link to comment
Share on other sites

That looks about right. Your CSS would look something like this:

.header_one {   font-weight: bold;   font-size: 24pt;}

You HTML might look like this:

<p class="header_one">HELLO</p>

If you need to adjust the size, just change the number of points.

Link to comment
Share on other sites

why don't you want to use a heading tag if that's the style your looking for?
I do not want to mess with inline css, it confuses me, better having all the css code in an external file.
Link to comment
Share on other sites

I do not want to mess with inline css, it confuses me, better having all the css code in an external file.
:) What does inline CSS have to do with using a heading tag? If you want a large bolded heading, use a heading tag. There's nothing to do with inline CSS (or embedded or external for that matter).
Link to comment
Share on other sites

Is there a way that i can give to a text, heading1-6 style using css?I am talking about the common h1-h6 html tags.Using css, is there a code that is the equivalent of the above tags?
I think you maybe a bit confused about this, but you can style headings in CSS without having to apply inline styles or even a class or ID to them for example.CSS:
h1 {font-size: 16px;}h2 {font-size: 14px;}

Link to comment
Share on other sites

I do not want to mess with inline css, it confuses me, better having all the css code in an external file.
right, but why would having to style a heading tag require inline styling? You do know you can target elements specifically, right?
h1{  font-size: 20px;  font-weight : bold;}

Link to comment
Share on other sites

right, but why would having to style a heading tag require inline styling? You do know you can target elements specifically, right?
h1{  font-size: 20px;  font-weight : bold;}

I am using joomla and some classes are already set by it,these, do not contain h1 tags etc.I did not want to "play" with the html(adding h1-h6 tags) so i used the present classes to make the styling.Thanks for reminding me though the above code. Edited by jimfog
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...