Trong hướng dẫn này, tôi sẽ giải thích cách chuyển hướng đến một phần cụ thể của trang trong HTML. Chúng tôi biết rằng các siêu liên kết được trình duyệt web sử dụng để điều hướng từ trang này sang trang khác
Tuy nhiên, bạn cũng có thể điều hướng đến các khu vực khác nhau của cùng một trang bằng siêu liên kết. Các siêu liên kết cũng có thể được sử dụng cho một phần cụ thể của một khu vực trang web khác
Hãy hiểu điều này với các bước giải thích dưới đây
Tạo một liên kết neo
For accessing the marked section of a page or jump to a marked section of a web page with the help of Go to the part of the page with the id name
Take a closer look and see how we have given an ID to a specific section with the help of Go to the HTML Links in our website.
Mã số
Redirect to a particular section of a page in HTML .mid { width: 30%; margin: 0px auto; font-family: Verdana,Geneva,sans-serif; height: 450px; overflow: auto; } .mid h1 { font-family: Verdana,Geneva,sans-serif; font-size: 17px; }Redirect to a particular section of a page in HTML
- First section
- Section section
First Section
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Second Section
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Hành hình
đầu ra
Theo mặc định, sau khi chạy mã, màn hình bên dưới sẽ xuất hiện
Nhấp vào liên kết phần đầu tiên
Nhấp vào liên kết phần thứ hai
Vì vậy, chúng ta có thể thấy từ đoạn mã trên cách chúng ta có thể chuyển hướng đến một phần cụ thể của trang. Ví dụ này cũng giải thích nếu bạn muốn chuyển đến một phần cụ thể của cùng một trang hoặc đến một trang web khác
Tôi hy vọng bạn thích hướng dẫn này, vui lòng để lại nhận xét của bạn bên dưới và đừng quên đăng ký trang web của chúng tôi để biết thêm các chủ đề như vậy