Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

134
Vistas
why script and div tag could much in html ,bug html and body tag only one

Nice to meet u ,my friend I had find in baidu.com ,cnds,stack overflow,but cannot get answer. I have two question "why script and div tag could much in html",other is "why html and body tag only one in html" Such as

<!DOCTYPE html>
<html lang="en">
<head>
</head>
<head>
</head>
<head>
</head>
<head>
</head>

<body></body>
<body></body>
<body></body>
<body></body>

</html>

can`t be work

But

<!DOCTYPE html>
<html lang="en">

<head>
    <script type="text/javascript">
        document.write("Hello World!")
    </script>
    <script type="text/javascript">
        document.write("Hello World!")
    </script>
    <script type="text/javascript">
        document.write("Hello World!")
    </script>
    <script type="text/javascript">
        document.write("Hello World!")
    </script>
    <script type="text/javascript">
        document.write("Hello World!")
    </script>
</head>

<body></body>

</html>

can be work

Because in the browsers base code? Please tell me why ,thank you very much Your`s friend zt :)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The HTML specification (unfortunately not transcribed into all languages) might help you out.

Basically an HTML page is structured like a tree.

<html>
  <head>
    // ..metadata, CSS, JS
  </head>
  <body>
    // document elements here
  </body>
</html>
 

The main HTML document can have only one <head> and one <body> element.

<head> includes meta-data, links to CSS, and often - but not always - links to JS scripts and, depending on the app you're creating, there may be lots of CSS and JS. They maybe links to scripts or CSS you've created, or links to scripts or links online, maybe stored in a open-source CDN.

<body> will contain the general markup for the page - all of the elements, the headings, sections, paragraphs etc will be here. It may also contain links to scripts too because sometimes those scripts rely on the document, and its elements, to be loaded first before they can be executed properly.

I suggest trying to read up on some documentation which has been translated into a few languages and small tutorials on how to make an HTML page first though. As you learn, you'll start to understand.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda