I understand that one must not use a tag (in this example) <hr /> or <br /> with out defining it.
I am still not clear as to how to define it or if it is defined in the css or htm?
Thanks again,
girard
I understand that one must not use a tag (in this example) <hr /> or <br /> with out defining it.
I am still not clear as to how to define it or if it is defined in the css or htm?
Thanks again,
girard
Tags are defined in the DTD (Document Type Definition) to which you point the parser with the <!DOCTYPE> tag at the beginning of your document. Both <hr> and <br> are defined in all doctypes since HTML 3.2 (except possibly frameset) and probably earlier.
Don't insert XHTML syntax (such as self-closing tags, the <TAGNAME /> construct) into HTML pages. It may have unexpected effects. Also, it's generally a bad idea to serve XHTML to clients.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
What Twey says is correct but, if you are still wondering about it, just go ahead and use the tags. They are perfectly fine 'as is' with the exception that you should not use that self closing slash, use <br> and <hr>, not <br /> and <hr />.Originally Posted by Girard Ibanez
Once you start getting a bit more advanced in your coding you can, if you choose, define style for these or any other elements on your page. A DOCTYPE is always a very, very, good idea but, not absolutely required for the novice. From the designer's perspective, all a DOCTYPE does is tend to make the appearance of the page a little more consistent in the various browsers.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
This is the doc type from DW8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
So if I wanted to create a white space, will the <br /> tag be the correct syntax and still be validated by w3c?
I know I am new to code but I have taken all your advice and rewrote my webpage. Great learning process and yes time consuming but well worth learning.
I guess I am trying to understand two tags (br and hr) and proper usage using the above doc type declared.
Thanks again
I repeat, don't serve XHTML to clients.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Which of the two doctype that DW8 offers for new page should I use?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
girard
The former.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Strict is best if you can use it. It is no good for validation with iframes though, and there are probably some other things like that. However, this cannot be stressed enough:
Don't use <br />
Use <br>--------------------------!
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
And frames in general, in fact (the target attribute is also disallowed) for the simple reason that it's recommended not to use themOriginally Posted by John
![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
On a different subject, that depends what exactly you're expecting the br element to do. It is for breaking lines, not inserting space between elements. For example:Originally Posted by Girard Ibanez
is fine, but:HTML Code:<div class="mailing-address"> 221B Baker Street<br> Westminster<br> London </div>
is not. In the latter case, CSS should be used to add more space using margins.HTML Code:<p>Some text</p><br><br> <p>Some more text</p>
Mike
Bookmarks