Click here to Skip to main content
15,886,652 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
<title>
	
    .sname p {
      font : bold normal 70px 'Averia Serif Libre', cursive;
      color : #9aa9d8;
      padding:0px;
      margin:10px;
      -webkit-text-fill-color: transparent;
      -webkit-background-clip: text;
      background-image:url(http://getwallpapers.com/wallpaper/full/0/b/d/69574.jpg);
      /*image to text*/  
    }
    .sname {
     background: linear-gradient( #010920,#617ed8, #8396d3,#617ed8, #010920);
    }
    header {
      height:40px;
      background-color:#010c30;
      padding-top:20px;
      position:sticky;
      top:10px;
    }
    header a {
      padding:100px;
      font: bold normal 20px Cambria Math;
      color:#9aa9d8;
    }
    .dropdown {
      display: inline-block;
      position: relative;
    }
    .dropdown::after {
      content: "\25b6"; 
      position: absolute;
      top: 6%; right: 65px;
      transform:rotate(90deg);
      color:lightblue;
    }
    .dropdown-options {
      display: none;
      position: absolute;
      background-color:#010c30;
      color:black;
      padding:5px; 
    }
    .dropdown:hover .dropdown-options {
      display: block;
    }


    .wel1{
      font-size:35px;
      margin-top:0px;
      background:radial-gradient()
    }
    .wel2{
      font-size:35px;
      margin-top:420px;
      margin-bottom:0px;
      background:radial-gradient()
    }
    .conver {
      font-size:30px;
      background-color: #010c30;
      border-radius:80px;
      color:#9aa9d8;
      padding:50px;
    }
    .intr h1 {
      text-align: center;
      font-size: 35px;
    }


	




	
		<div class="dropdown"><a href="#home">HOME</a><br>
		<div class="dropdown-options"><br>
			<a href="#intr">Introduction</a><br><br>
  		</div>
  		</div>
  		
  		<a href="#">TUTORIAL</a><a href="">ABOUT US</a><a href="">CONTACT US</a>
  	 

<a name="home">
	<div class="sname">
		<p align="center"> Suvedha Tutorial </p>
	</div>
	<p align="center" class="wel1"> Hello Everyone !!!</p><p align="center" class="wel2"><br>A warm welcome to all who took the time to visit this page.</p>
	<p align="center" class="conver">OK! Before going into the main topic, I just want you all to be a little interactive with me. <br>Will you ? Yes, fine.<br>So the thing is that when you feel sorrow, happiness, excitement, fear, etc...,<br>at that time you all have one person, whether he or she will be your parents, your siblings, or your friends, </p>
</a>
<a name="intr">
	<div id="intr">
		<h1>INTRODUCTION</h1>
		<p>OK! Before going into the main topic, I just want you all to be a little interactive with me. <br>Will you ? Yes, fine.<br>So the thing is that when you feel sorrow, happiness, excitement, fear, etc...,<br>at that time you all have one person, whether he or she will be your parents, your siblings, or your friends,</p>
	</div>
</a>


What I have tried:

By clicking on Introduction sub-menu inside the HOME, the Introduction part should be display
But it is not displaying
Posted
Updated 25-May-23 12:27pm
v2

If you are looking at fragment navigation within a page, then you need an element with an id property. the id property marks the destination target. Then you can use your anchor to navigate to it. The id property can be any element type, even another anchor element although that is highly unusual. Reference: <a>: The Anchor element - Linking to an element on the same page - HTML: HyperText Markup Language | MDN[^]

To re-write your code:
HTML
<h2 id="introduction">Introduction</h2>

And the anchor element:
HTML
<a href="#introduction">Click to navigate to Introduction</a>
 
Share this answer
 
Comments
Suvedha 27-May-23 2:56am    
By applying this introduction section is working but not the home part
let me post my question again
Graeme_Grant 27-May-23 3:17am    
You're not using what I advised. Do not use what @mike hankey advised below. Use id, not name.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900