What are logical and physical tags in HTML?
What are logical and physical tags in HTML?
- Logical tags are used to tell the meaning of the enclosed text. The example of the logical tag is <strong> </strong> tag. When we enclosed text in strong tag then it tell the browser that enclosed text is more important than other text.
- Physical text are used to tell the browser that how to display the text enclosed in the physical tag.
Some example of the physical tags are: <b>, <big>, <i>
In HTML there are both logical tags and physical tags. Logical tags are designed to describe (to the browser) the enclosed text's meaning.
Physical Tags:
Physical tags are used to indicate exactly how specific characters are to be formatted.
Syntax:
<Tag Name> Characters to be formatted. </Tag Name>
For example:
<B> ---</B>
Indicates that the text should be bold.
Logical Tags
Logical tags are used to indicate to the visually impaired that there is some emphasizes on the text. Each browser has its own technique as to how to indicate to its viewer that the text between the tags are different.
Syntax:
<Tag Name> Character/s to be formatted. </Tag Name>
For example:
<EM> --- </EM>
Indicates that characters should be emphasized in some way. Usually displayed in italics.
Logical tags are designed to describe (to the browser) the enclosed text's meaning. An example of a logical tag is the <strong> </strong> tag. ... <em> : emphasize - usually renders (made to look like by the browsers) as italic.
|
Bookmarks