<!-- Kindly be well advised there is nothing wrong with the code provided with regard to the subject.
However, there are minor violations of the use of HTML tags ("span tags") and missing tags. In addition, links to CDN source tags must be in chronological order, see below. I assume it was a copy / paste on your part. :) Nevertheless, always keep your code neat, clean, correct and follow the HTML coding rules "Use the correct document type." Always declare a document type as the first line in your document: ->
<!DOCTYPE html> <html lang="en-US">
Language declaration is important for advanced applications (screen readers) and search engines. However, we do not recommend omitting html tags and body tags. Skipping HTML tags or body tags can cause DOM and XML software to crash. Omitted body tags can also cause errors in older browsers (IE9).
In HTML5, head tags can be omitted. By default, browsers will add all elements before body tags to the default title tag element. You can reduce HTML complexity by omitting the head tags:
Set of navigation links before body tags: ->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://google.imtqy.com/material-design-icons/"> <link rel="stylesheet" href="https://cdn.materialdesignicons.com/1.1.34/css/materialdesignicons.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css"> <title>Materialize Dropdown List </title> <body> <ul id="slide-out" class="sidenav"> <li> <div class="user-view"> <div class="background"> <i class="mdi mdi-office small"></i> </div> <a href="#user"><img class="circle" src="https://www.directlink.coop/img/icons/avatars/145841-avatar-set/png/boy-1.png"></a> <a href="#name"><span class="black-text name">HappyCoder</span></a> <a href="#email"><span class="black-text email"> HC@gmail.com </span></a> </div> </li> <li><a href="#!"><i class="material-icons">cloud</i>MyCloud data vault</a></li> <li><a href='#' data-target='dropdown1' class='dropdown-trigger'>Drop Me!</a></li> <li><div class="divider"></div></li> <li><a class="subheader">Admin</a></li> <li><a class="waves-effect" href="#!">Bitcoin Expenses</a></li> </ul> <ul id='dropdown1' class='dropdown-content'> <li><a href="#!">one</a></li> <li><a href="#!">two</a></li> <li class="divider"></li> <li><a href="#!">If this has helped you in any way, you know what to do.</a></li> </ul> <div class="row"> <a href="#" data-target="slide-out" class="sidenav-trigger"><i class="mdi mdi-menu medium black-text left"></i></a> </div> <main> </main> <script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script> <script> $(document).ready(function(){ </script> </body> </hmtl>
source share