361:
25:
328:
is often used to describe a text that follows all the syntactic rules as well-formedness rules in the XML specification: strictly speaking the phrase is tautological, since a text that does not follow these rules is not an XML document. The rules for well-formed XML documents go beyond the general
153:
is one that is either a) opened and subsequently closed, or b) an empty element, which in that case must be terminated; and in either case which is properly
185:, and XML, empty elements (elements that inherently have no content) are terminated by putting a slash at the end of the "opening" (only) tag, e.g.
46:
402:
329:
requirements for the markup languages mentioned above. The additional rules include, for example, a rule to quote attribute values,
116:
97:
69:
50:
76:
431:
345:: a valid XML document is one that is not only well-formed, but also conforms to the grammar defined in its own DTD (
83:
35:
54:
39:
65:
346:
395:
334:
333:
of tag names, rules about the characters that can appear in names and elsewhere, the syntax of comments,
360:
324:
154:
337:, entity references, and CDATA sections, and many other similar details. Sometimes the adjective
158:
90:
388:
372:
208:
does not require one, but it is often added for compatibility with XHTML and XML processing.
134:
130:
368:
330:
426:
415:
421:
234:
228:
219:
24:
204:
etc. In HTML 4.01 and earlier, no slash is added to terminate the element.
205:
182:
226:
For example, the code below is not well-formed HTML, because the
142:
138:
319:
146:
18:
16:
Markup language element which is correctly nested and tagged
376:
222:, contains all of the other elements in the document.
396:
8:
243:<!-- WRONG! NOT well-formed HTML! -->
53:. Unsourced material may be challenged and
403:
389:
269:<!-- Correct: Well-formed HTML. -->
117:Learn how and when to remove this message
7:
357:
355:
51:adding citations to reliable sources
199:
193:
187:
175:
375:. You can help Knowledge (XXG) by
14:
215:all elements are well-formed, and
359:
171:<i><b>word</i>
168:is a well-formed element, while
23:
218:a single element, known as the
174:is not, since the bold element
1:
211:In a well-formed document,
448:
354:
284:</strong></em>
341:is used to contrast with
313:</strong></p>
291:</strong></p>
262:</strong></p>
347:Document Type Definition
305:<strong><em>
266:
240:
133:, and generally for all
335:processing instructions
166:<b>word</b>
371:–related article is a
164:For example, in HTML:
188:<img />
161:with other elements.
66:"Well-formed element"
432:World Wide Web stubs
325:well-formed document
200:<hr />
194:<br />
157:so that it does not
47:improve this article
151:well-formed element
331:case-sensitiveness
238:elements overlap:
384:
383:
127:
126:
119:
101:
439:
405:
398:
391:
363:
356:
314:
310:
307:strongemphasized
306:
303:
299:
295:
292:
288:
285:
282:strongemphasized
281:
277:
273:
270:
263:
259:
256:strongemphasized
255:
251:
247:
244:
237:
231:
203:
201:
197:
195:
191:
189:
178:is not closed.
177:
173:
172:
167:
135:markup languages
122:
115:
111:
108:
102:
100:
59:
27:
19:
447:
446:
442:
441:
440:
438:
437:
436:
412:
411:
410:
409:
352:
316:
315:
312:
308:
304:
301:
297:
293:
290:
286:
283:
279:
275:
271:
268:
265:
264:
261:
257:
253:
249:
245:
242:
233:
227:
198:
192:
186:
170:
169:
165:
131:web page design
123:
112:
106:
103:
60:
58:
44:
28:
17:
12:
11:
5:
445:
443:
435:
434:
429:
424:
414:
413:
408:
407:
400:
393:
385:
382:
381:
369:World Wide Web
364:
287:<strong>
280:<strong>
267:
254:<strong>
241:
224:
223:
216:
125:
124:
31:
29:
22:
15:
13:
10:
9:
6:
4:
3:
2:
444:
433:
430:
428:
425:
423:
420:
419:
417:
406:
401:
399:
394:
392:
387:
386:
380:
378:
374:
370:
365:
362:
358:
353:
350:
348:
344:
340:
336:
332:
327:
326:
322:, the phrase
321:
296:Alternatively
239:
236:
230:
221:
217:
214:
213:
212:
209:
207:
184:
179:
162:
160:
156:
152:
148:
144:
140:
136:
132:
121:
118:
110:
107:December 2009
99:
96:
92:
89:
85:
82:
78:
75:
71:
68: –
67:
63:
62:Find sources:
56:
52:
48:
42:
41:
37:
32:This article
30:
26:
21:
20:
377:expanding it
366:
351:
342:
338:
323:
317:
225:
220:root element
210:
180:
163:
150:
128:
113:
104:
94:
87:
80:
73:
61:
45:Please help
33:
339:well-formed
309:</em>
302:</em>
258:</em>
416:Categories
300:emphasized
298:<em>
278:emphasized
276:<em>
252:emphasized
250:<em>
77:newspapers
294:<p>
272:<p>
246:<p>
176:<b>
137:such as
34:does not
159:overlap
91:scholar
55:removed
40:sources
311:strong
289:strong
274:Normal
260:strong
248:Normal
235:strong
155:nested
145:, and
93:
86:
79:
72:
64:
367:This
343:valid
206:HTML5
183:XHTML
98:JSTOR
84:books
427:HTML
373:stub
232:and
149:, a
143:HTML
139:SGML
70:news
38:any
36:cite
422:XML
349:).
320:XML
318:In
181:In
147:XML
129:In
49:by
418::
229:em
141:,
404:e
397:t
390:v
379:.
202:,
196:,
190:,
120:)
114:(
109:)
105:(
95:·
88:·
81:·
74:·
57:.
43:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.