Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Style P And H? Html Tags
magiccode9
post Jun 26 2008, 02:40 PM
Post #1


Member - Active Contributor
Group Icon

Group: [HOSTED]
Posts: 84
Joined: 7-November 05
Member No.: 9,489



Well, I have found that css was very hard to predict and precise control their apperance.

When mix and use the p and h? tags. Their apperaence were not identity.
Place the h? tags within the p tag causes style error on both firefox and IE.

So, anyone should do it reserved, instead, place the p tag with any h? tags will do the jobs on both browsers.

Still learning it coz it much varies when doing styles.

Tested it on XHTML 1.0 Strict
Go to the top of the page
 
+Quote Post
FirefoxRocks
post Jun 27 2008, 12:24 AM
Post #2


Super Member
Group Icon

Group: [HOSTED]
Posts: 696
Joined: 12-July 06
From: Ontario, Canada
Member No.: 14,464



I did not understand your post quite well. I think what you are trying to say is this:

This is valid:
HTML
<h1> some text </h1>
<p>some text</p>


This is also valid:
HTML
<p>some text</p>
<h2>some heading</h2>


This is not valid ([X]HTML error) and redundant:
HTML
<h1><p>Some text</p></h1>


This is not valid:
HTML
<p><h4>Some text</h4></p>


By using valid XHTML Strict and CSS that isn't too fancy (syntax-wise, not appearance), you can be sure it is fairly consistent with most browsers (IE, Firefox, Opera, Safari), with some minor issues IE.

(e.g. Do not use "fancy" things like table[summary^="Employee Info"] because they won't be properly read in IE most likely.)

This post has been edited by FirefoxRocks: Jun 27 2008, 12:24 AM
Go to the top of the page
 
+Quote Post
Herbert
post Jul 10 2008, 05:44 AM
Post #3


Premium Member
Group Icon

Group: [HOSTED]
Posts: 432
Joined: 4-September 04
Member No.: 234



Yep, you really shouldn't mix P tags with header tags. One is essentially like the other, only Header tags will format the text differently.

You can customize how the text looks in those types of tags using CSS. So if you want a H2 tag to be 12px, and a H1 tag to be 16px, you can just do that in a style sheet, and it will automatically apply those styles whenever you use those tags. Saves the trouble of updating individual sections of code if you need to change something, as you will only need to change the style sheet, and it will automatically update whichever page is using that stylesheet!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Basic Tips and Tricks in HTML(15)
  2. Embedding XML into HTML(2)
  3. Div Tags Vs Tables For Layout(10)
  4. Force Object To Load Last(2)
  5. Free Shoutbox? HTML, Flash or PHP Code(24)
  6. Here Are Some Html Tutorial Sites(1)
  7. Get Input From Html/txt File?(2)
  8. How Can You Spice Up Your Basic HTML Site ? Beginner Needs Help(9)
  9. HTML Editor(23)
  10. Need Help With The HTML HR Tag(5)
  11. HTML: Seems Like A Simple Problem, But I'm Baffled!(4)
  12. Where To Find A WML To HTML Converter ?(2)
  13. A First Peep Into Html(5)
  14. Home Videos(4)
  15. Bulletproof HTML: 37 Steps To Perfect Markup(4)
  1. Quick Tips On Html And Css(11)
  2. Firefox Inventing Its Own Html?(9)
  3. Scripts And Html(13)
  4. Stretching My Site Vertically(6)
  5. Outsourcing A Style Section To An External Css File(7)
  6. Html Stats(3)
  7. About Html(15)
  8. Html Table Issue.(18)
  9. Html Emails How?(12)
  10. Sitepoint's Css And Html Reference Sites(2)
  11. Yaml - (x)html/css Framework(2)
  12. Indentation In Html(4)
  13. Good Books For Html And Css Beginners(1)


 



- Lo-Fi Version Time is now: 12th October 2008 - 06:23 AM