IT 英語

attribute: 属性

もくじ

はじめに

HTML のコーディングでは、HTML タグ(ユーザーコントロール)の機能を利用する際に「属性」の値を切り替えることが多くあります。例えば、

img タグに alt 属性を設定する。
a タグの href 属性を変更する。

などがあります。今回は、この「表示する」という表現を学習しましょう。

「属性」は "attribute"

先の例を使って、英語での表現を見ていきましょう。

例1

日本語
img タグに alt 属性を設定する。

英語
I set alt attribute on img tag.

例2

日本語
a タグの href 属性を変更する。

英語
I change href attribute of a tag.

実践編

実践1

What is the purpose of the “role” attribute in HTML?
https://stackoverflow.com/questions/10403138/what-is-the-purpose-of-the-role-attribute-in-html

原文(タイトル)
What is the purpose of the “role” attribute in HTML?

和訳
HTML において、role 属性の目的は何ですか?

実践2

Difference between id and name attributes in HTML
https://stackoverflow.com/questions/1397592/difference-between-id-and-name-attributes-in-html

原文(一部抜粋)
What is the difference between the id and name attributes?

和訳
id (属性)と name 属性の違いは何ですか?

さいごに

属性という表現は、HTML 以外にも XML でも使われる概念ですね。HTML は日常的に読んだり書いたりする方も多いと思うので、是非 attribute という単語を覚えて貰えればと思います。

-IT 英語