Different Stylesheets for Different Days of the Week using Javascript

Name your css files accordingly: Saturday.css, Friday.css, Sunday.css, etc… If JavaScript is disabled in the browser, it will revert back to the default.css file. <script type=”text/javascript”>  <!–  dayNames = [“Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”];  dayNumber = new Date().getDay();  document.writeln(‘<link rel=”stylesheet” type=”text/css” href=”‘ + dayNames[dayNumber] + ‘.css”>’);  //–>  </script>  <noscript>  <link rel=”stylesheet” type=”text/css” href=”default.css”> … Continue reading Different Stylesheets for Different Days of the Week using Javascript

The Difference Between ID and Class

ID’s and Classes are “hooks” We need ways to describe content in an HTML/XHTML document. The basic elements like <h1>, <p> and <ul> will often do the job, but our basic set of tags doesn’t cover every possible type of page element or layout choice. For this we need ID’s and Classes. For example <ul… Continue reading The Difference Between ID and Class