Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

DocType Validation Error

Engaged ,
Aug 23, 2025 Aug 23, 2025

Hello
Here is my template page:


https://meherbabalibrary.org/pages/radiohour-1969.html

 

The pages I plan to create will be with text (word documents), insert of PDF document,
Insert of MP4 videos and insert of photographs. Nothing complicated. I do not want to change the appearance, the visual of this template.

 

What I did was run validation. One error was located on this template page. It is Doctype.

 

Do I ignore the error or is it bes to change the text string. I page shows it is HTML 5

 

Once I fix this error below I will then use a CSS link to begin to develop the pages.

 

Error:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Traditional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Traditional.dtd">

 

Thanks

TOPICS
Error , How to
241
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 23, 2025 Aug 23, 2025

When you create a new HTML document in Dreamweaver, it will automatically show the HTML5 doctype:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

 

But to be more precise, the minimal requirement for modern HTML documents is:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>

...
Translate
Community Expert ,
Aug 23, 2025 Aug 23, 2025

When you create a new HTML document in Dreamweaver, it will automatically show the HTML5 doctype:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

 

But to be more precise, the minimal requirement for modern HTML documents is:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>

<body>
</body>
</html>

 

As a side note, do you realise that there is a missing <script> tag missing from the JavaScript starting on line 105?

 

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 24, 2025 Aug 24, 2025

Hello

Just now read 'As a side note, do you realise that there is a missing <script> tag missing from the JavaScript starting on line 105?

I don't understand.

Line 105 shows:

function MM_preloadImages() { //v3.0

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2025 Aug 24, 2025

Which version of Dreamweaver are you using?  I ask because this code is outdated.  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Traditional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Traditional.dtd">

   

If you're using an outdated Template, you're setting yourself up for more failure later. 

 

CODE TUTORIALS:

- https://www.w3schools.com/html/
- https://www.w3schools.com/css/
- https://www.w3schools.com/js/
- https://www.w3schools.com/bootstrap/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 24, 2025 Aug 24, 2025

Dreamweaver 21.4

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2025 Aug 24, 2025

The following JavaScript snippet is incomplete due to a missing opening <script> tag:

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>

 

To ensure proper HTML validation and functionality, the code block must begin with a <script> tag to match the closing </script> tag. Here's the corrected version:

<script>
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>

 

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 24, 2025 Aug 24, 2025
LATEST

Thank you for this observation.

The correction is now applied.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines