Trong bài viết này, chúng ta sẽ xem cách thêm Đường kẻ ngang trong HTML. Đối với điều này, có 2 cách tiếp cận
- By using the tag
- Bằng cách sử dụng Thuộc tính CSS
Chúng tôi sẽ thảo luận tuần tự cả hai cách tiếp cận để thêm đường ngang
Adding the Horizontal Line using tag: The Horizontal Rule tag [] is used for the purpose of inserting horizontal lines in the HTML document in order to separate sections of the document. It is an empty or unpaired tag that means there is no need for the closing tag.
cú pháp
Example 1: This example describes the tag to add the horizontal line.
HTML