Computer >> Máy Tính >  >> Lập trình >> HTML

Thẻ
HTML

Thẻ


trong HTML thêm một dòng phân tách nội dung trong tài liệu HTML. Dấu ngắt theo chủ đề được xác định bởi thẻ
trong HTML5. Nó không có thẻ kết thúc.

Bây giờ chúng ta hãy xem một ví dụ để triển khai thẻ


-

Ví dụ

<!DOCTYPE html>
<html>
<head>
<title>Document Title</title>
</head>
<body>
   <h1>Products</h1>
   <p>Here are the products −</p>
   <h2>Clothing</h2>
   <p>Clothing includes T-Shirts, Shirts, Jeans, Trousers and Hoodie.</p>
   <hr>
   <h2>Electronics</h2>
   <p>Electronics includes Mobile, Mobile Accessories,Laptops, Desktop systems, etc.</p>
</body>
</html>

Đầu ra

Thẻ  hr  HTML

Trong ví dụ trên, trước tiên chúng ta đã thiết lập một phần -

<h2>Clothing</h2><p></p>
<p>Clothing includes T-Shirts, Shirts, Jeans, Trousers and Hoodie.</p>

Sau đó, chúng tôi đã sử dụng thẻ


để tách nội dung bên trên với nội dung bên dưới -

<hr>
<h2>Electronics</h2>
<p>Electronics includes Mobile, Mobile Accessories,Laptops, Desktop systems, etc.</p>