Thuộc tính dịch HTML


Thí dụ

Chỉ định rằng một số phần tử không nên được dịch:

<p translate="no">Don't translate this!</p>
<p>This can be translated to any language.</p>


Định nghĩa và Cách sử dụng

Thuộc translatetính chỉ định nội dung của một phần tử có nên được dịch hay không.

Kiểm tra: Nhấp vào hình ảnh Google dịch (bên cạnh nút tìm kiếm ở đầu trang) để chuyển sang ngôn ngữ khác và xem điều gì sẽ xảy ra với từ "kem" bên dưới:

Ở đây chúng tôi sử dụng translate = "no": ice cream.


Hỗ trợ trình duyệt

Attribute
translate Not supported Not supported Not supported Not supported Not supported

Cú pháp

<element translate="yes|no">

Giá trị thuộc tính

Value Description
yes Specifies that the content of the element should be translated
no Specifies that the content of the element must not be translated

Các trang liên quan

Hướng dẫn HTML: Thuộc tính HTML