diff --git a/script.js.js b/JavaScript1.js similarity index 100% rename from script.js.js rename to JavaScript1.js diff --git a/style.css.css b/StyleSheet1.css similarity index 100% rename from style.css.css rename to StyleSheet1.css diff --git a/index.html.html b/index.html similarity index 100% rename from index.html.html rename to index.html diff --git a/script.js b/script.js new file mode 100644 index 0000000..6cfd7bc --- /dev/null +++ b/script.js @@ -0,0 +1,8 @@ +document.querySelectorAll('nav ul li a').forEach(anchor => { + anchor.addEventListener('click', function(e) { + e.preventDefault(); + document.querySelector(this.getAttribute('href')).scrollIntoView({ + behavior: 'smooth' + }); + }); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..e52d107 --- /dev/null +++ b/style.css @@ -0,0 +1,40 @@ +body { + font-family: Arial, sans-serif; + line-height: 1.6; + margin: 0; + padding: 0; +} + +header { + background: #333; + color: #fff; + padding: 1em 0; + text-align: center; +} + +nav ul { + list-style: none; + padding: 0; +} + + nav ul li { + display: inline; + margin: 0 10px; + } + + nav ul li a { + color: #fff; + text-decoration: none; + } + +section { + padding: 2em 0; + border-bottom: 1px solid #ccc; +} + +footer { + background: #333; + color: #fff; + text-align: center; + padding: 1em 0; +}