<!DOCTYPE html>
<html>
    <head>
        <link type='text/css' rel='stylesheet' href='style.css'/>
        <title>Get Started!</title>
    </head>
    <body>
        <p><?php echo ""; ?></p>
    </body>
</html>

I thought css needed to be imbeded or linked from the <sript> tag?

Dani AI

Generated

— the confusion you had is common. , and pointed you in the right direction; below are up-to-date, practical tips to avoid layout or loading issues and to speed a page up in production.

Use non-blocking script loading for anything that does not need to run before the page paints. Modern options include defer for normal scripts and type="module" for ES modules (which are implicitly deferred). For third-party snippets that do not touch layout, async is useful. Example patterns:

<script src="app.js" defer></script>

<script type="module" src="/js/main.js"></script>

Also consider Subresource Integrity (SRI) plus crossorigin when loading libraries from CDNs, and keep critical CSS available early (or inline the minimal critical rules) to avoid flashes of unstyled content.

Quick troubleshooting checklist:

  • Look at DevTools Network: 404s, wrong MIME types, or blocked requests explain most failures.
  • Check Console for syntax/CORS/SRI errors.
  • Validate paths (relative vs absolute) and server headers (Content-Type).
  • Use cache-busting (versioned filenames or query strings) during deploys.

For reference on attributes and modern loading behavior see the MDN docs for the script element and for guidance on optimizing CSS delivery:
MDN: script element

Recommended Answers

All 3 Replies

CSS inclusion above is correct. <script> is for Javascript.

<script type="text/javascript" src="put the path of javascript file here"> </script>

If you include an external js file, you should do so after the reference to your external stylesheet.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.