...

View Full Version : Need a doctype



JAVAEOC
02-07-2004, 12:51 AM
well i need a doctype but which one?

I know that strict doesnt work for me :(

ez4me2c3d
02-07-2004, 12:58 AM
well then try transitional.

i never understood why they give options. it should always be strict if i understandit correctly.

i mean what other way is there to code than the right way?

fredmv
02-07-2004, 01:08 AM
Why not check the sticky (http://www.codingforums.com/showthread.php?s=&threadid=18346) on this?

And ez4me2c3d, it's quite simple: not everyone is good at Web programming. Thus, easier options must be provided. If you're new to using Web standards, or XHTML specifically in this case, you'd want to use XHTML 1.0 Transitional first because you're still transitioning over to it. Then, when you got everything down, use the more rigorous versions: XHTML 1.0 Strict and XHTML 1.1.

JAVAEOC
02-07-2004, 02:49 AM
Ok all i need to fix is my <h2>

it doesnt allow it so how do i fix that tag?

fredmv
02-07-2004, 03:03 AM
Heading tags are allowed in all DOCTYPEs, you're likely doing something else wrong.

JAVAEOC
02-07-2004, 03:09 AM
1. Line 56, column 16: document type does not allow element "span" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

<span class="DF">DF</span>
^

2. Line 57, column 18: document type does not allow element "span" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

<span class="BATA">BETA</span>
^

3. Line 58, column 21: document type does not allow element "span" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

<span class="Content">
^

4. Line 59, column 3: document type does not allow element "h2" here; missing one of "object", "ins", "del", "map", "button" start-tag

<h2>Lorem ipsum</h2>
^

5. Line 60, column 2: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent vel eros e
^

6. Line 61, column 2: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag

<p>Nunc porttitor mi in nulla. Nulla lacinia leo ut lacus. Vestibulum at nulla a
^

7. Line 62, column 2: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag

<p>Aliquam id lectus sed velit aliquam gravida. Donec libero velit, egestas a, s
^

8. Line 63, column 2: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag

<p>Phasellus tempus nisl in erat. In hac habitasse platea dictumst. Donec adipis
^

9. Line 64, column 2: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag

<p>Nulla sem mauris, luctus dignissim, cursus a, egestas nec, erat. Duis loborti
^

10. Line 65, column 2: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag

<p>Etiam tincidunt est eget sapien. Maecenas tincidunt, tellus eu ullamcorper ve
^

11. Line 66, column 2: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag

<p>Duis molestie arcu a leo. Suspendisse potenti. Donec eu mi. Sed sit amet est.
^

Source Listing

Below is the source input I used for this validation:

1: <?xml version="1.0" encoding="ISO-8859-1"?>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd">
3: <html>
4: <head>
5: <meta http-equiv="Content-Type" content="text/html;; charset=ISO-8859-1" />
6: <title>DF High School Beta Club</title>
7:
8: <!-- ULTIMATE DROP DOWN MENU Version 4.0 by Brothercake -->
9: <!-- http://www.brothercake.com/dropdown/ -->
10: <script type="text/javascript" src="udm-resources/udm-custom.js"></script>
11: <script type="text/javascript" src="udm-resources/udm-control.js"></script>
12: <script type="text/javascript" src="udm-resources/udm-style.js"></script>
13: <script type="text/javascript" src="udm-resources/udm-dom.js"></script>
14: <script type="text/javascript" src="udm-resources/udm-mod-keyboard.js"></script>
15: <script type="text/javascript" src="udm-resources/JS.js"></script>
16: <link href="udm-resources/Style.js" rel="stylesheet"></link>
17:
18: </head>
19: <body>
20:
21:
22:
23: <ul id="udm" class="udm">
24: <li><a href="">Home</a>
25: <ul>
26: <li><a href="">About</a></li>
27: <li><a href="">Contact</a></li>
28: <li><a href="">About</a></li>
29: <li><a href="">Contact</a></li>
30: <li><a href="">About</a></li>
31: <li><a href="">Contact</a></li>
32: <li><a href="">About</a></li>
33: <li><a href="">Contact</a></li>
34: </ul>
35: </li>
36:
37: <li><a href="">About</a></li>
38: <li><a href="">More</a></li>
39: <li><a href="">Stuff</a></li>
40: <li><a href="">#C4C4C4</a></li>
41: <li><a href="">#00A000</a></li>
42:
43: </ul>
44:
45: <table class="ContextTable" id="ContextMenu">
46: <tr><td class="ContextMenu" id="LinkOne" onmouseover="Color(this.id);Stop()" onmouseout="UnColor(this.id);Delay()">Now its starting to look better</td></tr>
47: <tr><td class="ContextMenu" id="LinkOneA" onmouseover="Color(this.id);Stop()" onmouseout="UnColor(this.id);Delay()">Maybe we need a little bit more padding?</td></tr>
48: <tr><td class="ContextMenu" id="LinkOneB" onmouseover="Color(this.id);Stop()" onmouseout="UnColor(this.id);Delay()">Some option a user might want to add</td></tr>
49: <tr><td class="ContextMenu" id="LinkOneC" onmouseover="Color(this.id);Stop()" onmouseout="UnColor(this.id);Delay()">!!!!!Ask about Valing in css!!!!!</td></tr>
50: <tr><td class="ContextMenu" id="LinkOneD" onmouseover="Color(this.id);Stop()" onmouseout="UnColor(this.id);Delay()">Do some thing bigger</td></tr>
51: <tr><td onmouseover="Stop();Hide(1,4)" onmouseout="Delay()"><p class="Divider"></p></td></tr>
52: <tr><td class="ContextMenu" id="LinkTwo" onmouseover="Color(this.id);Stop()" onmouseout="UnColor(this.id);Delay()" onclick="PrintPage()">Print this page</td></tr>
53: <tr><td class="ContextMenu" id="LinkThree" onmouseover="Color(this.id);Stop()" onmouseout="UnColor(this.id);Delay()" onclick="Source()">View Source</td></tr>
54: </table>
55:
56: <span class="DF">DF</span>
57: <span class="BATA">BETA</span>
58: <span class="Content">
59: <h2>Lorem ipsum</h2>
60: <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent vel eros et magna aliquam aliquam. Aenean laoreet interdum metus. In vitae tellus. Integer mollis. Donec commodo. Phasellus wisi. Phasellus tristique dui non lorem. Suspendisse nulla ligula, accumsan vitae, tincidunt eu, pretium at, mi. In hac habitasse platea dictumst. In lacus. Ut turpis.</p>
61: <p>Nunc porttitor mi in nulla. Nulla lacinia leo ut lacus. Vestibulum at nulla ac velit pulvinar aliquam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Maecenas pulvinar pede ac nunc. Vestibulum aliquam eleifend nulla. Morbi sodales. In elementum bibendum ante. Quisque et risus at nisl consequat viverra. Suspendisse dapibus tempus nisl. Curabitur id nulla. Vivamus risus. Nunc vel erat. Pellentesque volutpat, ipsum quis iaculis ullamcorper, sem velit pharetra est, sit amet consectetuer nulla nulla ac est. Proin magna. Etiam consequat cursus augue. Proin accumsan. Proin lacus dolor, suscipit non, imperdiet vitae, eleifend ut, diam.</p>
62: <p>Aliquam id lectus sed velit aliquam gravida. Donec libero velit, egestas a, semper nec, sollicitudin quis, wisi. Phasellus eget ligula et mi vehicula sodales. Nulla ipsum. Proin lorem. Vestibulum malesuada luctus lectus. Cras luctus. Nunc leo mauris, convallis sed, vestibulum et, ultrices sit amet, purus. Pellentesque venenatis, tortor non auctor gravida, erat libero pulvinar nisl, non porta nisl nunc eget sem. Nunc volutpat facilisis mi. Maecenas quis ligula. Vivamus erat tellus, ullamcorper eu, porta non, luctus sit amet, ante. Sed tincidunt vulputate sapien. Vestibulum neque. Etiam ac libero. Nam congue iaculis erat. Mauris id lorem vitae sapien semper lacinia. Integer adipiscing.</p>
63: <p>Phasellus tempus nisl in erat. In hac habitasse platea dictumst. Donec adipiscing condimentum turpis. Integer varius aliquam diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur non mi. Nulla luctus est quis neque. Praesent nec arcu. Proin ac velit et nulla convallis dapibus. Praesent velit tortor, vulputate ut, suscipit vel, pretium eget, diam. Praesent rutrum purus sed velit. Praesent lectus elit, scelerisque id, porttitor sit amet, placerat a, odio.</p>
64: <p>Nulla sem mauris, luctus dignissim, cursus a, egestas nec, erat. Duis lobortis. Aliquam dolor. Nullam vestibulum vestibulum dui. Morbi ac velit non urna condimentum tristique. Nunc magna magna, rutrum sed, rutrum et, dictum a, tortor. Sed odio. Vestibulum sed libero. Nullam feugiat egestas leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer porta.</p>
65: <p>Etiam tincidunt est eget sapien. Maecenas tincidunt, tellus eu ullamcorper vehicula, elit felis luctus sapien, non sollicitudin neque lorem ut nunc. Nulla feugiat lorem at neque. Nulla sagittis, velit ut placerat malesuada, augue sapien sollicitudin libero, ac posuere libero magna sit amet sapien. Nunc eleifend augue quis tortor. Vivamus a mi ut mi commodo sodales. Morbi in lorem. Etiam sed wisi in velit sollicitudin congue. Proin leo. Nam sagittis. Maecenas congue nulla non eros. Nunc ac dui eu tellus eleifend semper. Donec sit amet sapien. Nam dolor</p>
66: <p>Duis molestie arcu a leo. Suspendisse potenti. Donec eu mi. Sed sit amet est. Suspendisse potenti. Ut tincidunt risus vitae quam. Pellentesque eu lacus. Aliquam at risus at sapien tempor fermentum. Nulla quis est quis turpis tristique mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec varius mi eget ligula.</p>
67: </span>
68:
69: </body>
70: </html>


volle moehre

thanks

see no p no span no h2 :(

JAVAEOC
02-07-2004, 03:10 AM
and where can i validate my js and css and why did my js stop working when i added a doctype?

JAVAEOC
02-07-2004, 10:28 PM
Im sorry for posting so much but it was the only way to show whats wrong with my page (since someone else told me that I CAN use h2 and span and all that stuff, but the validtaor sais i CAN NOT)

please help

me'
02-09-2004, 07:04 PM
You can only use block level elements inside <body>. Block level elements can't reside within inline level elements.

Nightfire
02-09-2004, 07:24 PM
Change <span> to <div>

JAVAEOC
02-10-2004, 12:27 AM
thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum