Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By sasha_bolcina

Thread: How do I attach a Style.css and JS File with my HTML5 Document?

  1. #1
    Member
    Join Date
    Aug 2014
    Posts
    88
    Member #
    40011
    Liked
    2 times

    How do I attach a Style.css and JS File with my HTML5 Document?

    Like how would I do it exactly? Do I create the files alone then attach them or attach them then create them?

  2.  

  3. #2
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    You can do either i usually attach them in the beginning stages but it wouldnt make a difference except to accurately design a page using css id assume you would need to SEE the results, which can only be done once the file is attached


    Regretfully sent from my iPhone using Tapatalk during lunch and other breaks

  4. #3
    Member
    Join Date
    Aug 2014
    Posts
    88
    Member #
    40011
    Liked
    2 times
    Ok so either way I'm ok I'll attach my styles.css page after the normal HTML5 coding but the JS file is written how? js. what?

  5. #4
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    Its going to be hard to get the scripts to work right without testing it.. You cant test it without it being linked.. So id recommend linking them before you begin working on writing the scripts but it doesnt matter if you link them before or after writing the html except its almost going to be guaranteed you will be altering things to make other things work


    Regretfully sent from my iPhone using Tapatalk during lunch and other breaks

  6. #5
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Quote Originally Posted by James92 View Post
    Ok so either way I'm ok I'll attach my styles.css page after the normal HTML5 coding but the JS file is written how? js. what?
    Put the CSS in a separate file and link to it with the <link> tag.
    Put the JS in a separate file and call it with the <script> tag.

    Do this from the very start. As long as the file you link to exists, it won't matter whether there's actual code in it.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  7. #6
    Member
    Join Date
    Aug 2014
    Posts
    88
    Member #
    40011
    Liked
    2 times
    I just wrote in this code after I created the JS File in my JS Folder <script type="text/javascript" src="vacation.js"></script> and I'm getting this message :s ('vacation.js' is not on the local disk.Get) is the message I am getting in Dreamweaver and the Get link does not work........?

  8. #7
    Senior Member sasha_bolcina's Avatar
    Join Date
    Sep 2014
    Location
    Serbia
    Posts
    274
    Member #
    40099
    Liked
    47 times
    Src should be "js/vacation.js"
    <script type="text/javascript" src="js/vacation.js"></script>

  9. #8
    Junior Member
    Join Date
    Nov 2014
    Posts
    2
    Member #
    40807
    Yes, Put the CSS in a separate file and link to it with the <link> tag.
    Put the JS in a separate file and call it with the <script> tag.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:53 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com