Hi, Please can any one Help How to create Header Tags(H1, H2, H3, ......) Using CSS??? Regards EDT123
if u wnt to creat h1 tag without typing any h in html code and wnt to creat this h1 tag by make changed in css file, then i dont know, if u wnt give h1 tag a property without giving it any class or id , u can cread h1{} in css then whererver h1 is exist in ur linked css files , they can be changed automaticaly according to ur css property,
Like this. HTML code: <h1> This is a header </h2> CSS code: h1 { font-weight : bold; } The above code would embolden the heading
I think you meant: <h1> This is a header </h1> Can't close an h1 tag with a closing h2 tag...wouldn't validate
There is a way to make a header with css... but not in IE. There's the :before and :after pseudo elements which can add content dynamically.
Hmm, since IE doesn't support them I don't use them. But looking into it, I was wrong-- you can insert the content, but not the tag (though if you made the tag in the "content" part, I wonder if the browser would just parse it like a tag) : <div id="foo"> </div> #foo:before { content: "<h1>Foo Man Choo</h1>"; } But technically "content" outputs a string, not anything else. I've never looked to see what a browser would do with that. I would think it'd be: <div id="foo"><h1>Foo Man Choo</h1></div> Not that h1's belong in divs, but I guess if you wanted the same h1 at the beginning of each page container div or something, it might work. But again content isn't supposed to be parsable stuff, just CDATA, but how's a browser gonna know not to pay attn to those < and >'s?
Re-read my post. Referring to :before and :after. IE6 and IE7 do not support those selectors, therefore I do not use them.