I am not able to get the following HTML document ouput! (html-css-javasciprt)

[link for the css]:https://github.com/mdn/learning-area/blob/master/html/introduction-to-html/the-html-head/style.css

[link for javascript code file]:https://github.com/mdn/learningarea/blob/master/html/introduction-to-html/the-html-head/script.js


   <!DOCTYPE html>
   <html lang="en-US">
   <head>
     <meta charset="utf-8">
     <title>Meta examples</title>

     <meta name="author" content="Chris Mills">
     <meta name="description" content="This is an example page to demonstrate usage of metadata on web pages.">
     <meta property="og:image" content="https://developer.cdn.mozilla.net/static/img/opengraph-logo.dc4e08e2f6af.png">
     <meta property="og:description" content="This is an example page to demonstrate usage of metadata on web pages.">
     <meta property="og:title" content="Metadata; The HTML &lt;head&gt;, on MDN">
     <link rel="Shortcut Icon" href="favicon.ico" type="image/x-icon">
     <link rel="stylesheet" href="style.css">
    </head>
    <body>
     <h1>Meta examples</h1>
     <p>Japanese example: ご飯が熱い。</p>
     <script src="script.js"></script>
    </body>
   </html>

When I was trying to run the above HTML code, the output just shows this

Meta examples

japanese example:???

I was trying to learn to become a front-end developer, so I just started with HTML where I got struck in this. Please anyone help me with this. The above HTML document does not consider the CSS and Javasricpt file even though it is presented in the same directory. I also tried it with different browsers.

1 answer

  • answered 2019-10-15 13:21 Sibasish Mohanty

    enter image description herePlease provide correct path in the src attribute of your link tag and it should work.

    Check:

    <!DOCTYPE html>
    <html lang="en-US">
    
    <head>
      <meta charset="utf-8">
      <title>Meta examples</title>
    
      <meta name="author" content="Chris Mills">
      <meta name="description" content="This is an example page to demonstrate usage of metadata on web pages.">
      <meta property="og:image" content="https://developer.cdn.mozilla.net/static/img/opengraph-logo.dc4e08e2f6af.png">
      <meta property="og:description" content="This is an example page to demonstrate usage of metadata on web pages.">
      <meta property="og:title" content="Metadata; The HTML &lt;head&gt;, on MDN">
      <link rel="Shortcut Icon" href="favicon.ico" type="image/x-icon">
      <link rel="stylesheet" href="https://github.com/mdn/learning-area/blob/master/html/introduction-to-html/the-html-head/style.css">
    </head>
    
    <body>
      <h1>Meta examples</h1>
      <p>Japanese example: ご飯が熱い。</p>
      <script src="https://github.com/mdn/learningarea/blob/master/html/introduction-to-html/the-html-head/script.js"></script>
    </body>
    
    </html>