Can yazdığım kod da bu hocam
` <html>
<head>
<title>Sayfa Başlığı</title>
<script> var acc = document.getElementsByClassName(“accordion”);
var i;
for (i = 0; i < acc.length; i++) {
acc.addEventListener(“click”, function() {
this.classList.toggle(“active”);
var panel = this.nextElementSibling;
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
} else {
panel.style.maxHeight = panel.scrollHeight + "px";
}
/*
if (panel.style.display === “block”) {
panel.style.display = “none”;
} else {
panel.style.display = “block”;
}
/
});
} </script>
<style type=“text/css”>
/ Style the buttons that are used to open and close the accordion panel */
.accordion {
background-color: #EEE;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
text-align: left;
border: none;
outline: none;
transition: 0.4s;
}
.accordion:after {
/* Unicode character for “plus” sign (+) */
content: ‘\02795’;
font-size: 13px;
color: #777;
float: right;
margin-left: 5px;
}
.active, .accordion:hover {
background-color: #CCC;
}
.active:after {
/* Unicode character for “minus” sign (-) */
content: “\2796”;
}
/* Style the accordion panel. Note: hidden by default */
.panel {
padding: 0 18px;
background-color: white;
// display: none;
max-height: 0;
overflow: hidden;
transition: max-height 0.5s ease-out;
}
</style>
</head>
<body>
<button class=“accordion”>HTML</button>
<div class=“panel”>
<p><strong>HTML (HyperText Markup Language)</strong> is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page’s appearance/presentation (CSS) or functionality/behaviour (JavaScript).</p>
<p>"Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.</p>
</div>
<button class=“accordion”>CSS</button>
<div class=“panel”>
<p><strong>CSS (Cascading Style Sheets)</strong>is a stylesheet language used to describe the presentation of a document written in HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS describes how elements should be rendered on screen, on paper, in speech, or on other media.</p>
<p>CSS is one of the core languages of the <strong>open Web</strong> and is standardized across Web browsers according to the W3C specification. Previously development of various parts of CSS specification was done synchronously, which allowed versioning of the latest recommendation. You might have heard about CSS1, CSS2.1 CSS3. However, CSS4 has never become an official version.</p>
</div>
<button class=“accordion”>JavaScript</button>
<div class=“panel”>
<p><strong>JavaScript (JS)</strong> is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles.</p>
</div>
</body>
</html>`