Free HTML course – Physical tags

Free HTML course – Physical tags cover image
  1. Home
  2. HTML
  3. Free HTML course – Physical tags

Text in HTML code can be dressed up in various ways so that it’s displayed differently by the browser. Text can be made Bold, Underlined, Italicized, Struck-through etc. Moreover, you can make text both italicized and bold at the same time.

There are many tags that perform such embellishments on text. These tags can be either Physical Tags or Logical Tags.

So what is the difference between these?
Physical tags define how the text should be displayed in the browser. They control the Physical characteristics of the text.
Logical Tags on the other hand indicate the ‘type’ of content they enclose. They do not determine the display of the text and the browser is free to set the presentation.
More on these differences in the next session.

Sponsored Links

Physical Tags

There are 10 physical tags each requiring a closing tag:

Tag Nesting

Physical tags can be nested i.e. one tag can be placed (including its closing tag) inside another. Let’s test this.

<B>Some text</B> displays Some text which is in bold.

Give more emphasis by underlining this text.

<U><B>Some text</B></U> displays Some text
which is bold and underlined

Still more emphasis.

<I><U><B>Some text</B></U></I> displays Some text
which is bold, underlined and in italics.

Just remember to always put the end tag of the nested element before the end tag of the enclosing element. I advise you to develop the habit of putting the end tag the moment you open a tag. It’s a good practice and will prevent headaches since HTML files with <TABLE>, <TR>, <TD> (discussed in Advanced HTML Tutorials) etc. can become quite confusing.