WebDevelopersNotes logo

home-icon Home / HTML / Free HTML course – Physical tags

Free HTML course – Physical tags

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:

  • <I> Italics:   I am in italics
  • <B> Bold:   I am in bold
  • <U> Underline:   I am underlined
  • <STRIKE> Strikethrough:   I am struck!
  • <SUP> Superscript:   My superscript
  • <SUB> Subscript:   My subscript
  • <TT> Typewriter:   I am in typewriter form
  • <BIG> Bigger font:   I am bigger
  • <SMALL> Smaller font:   I am smaller
  • <S> Strikethrough alternative:   I am also struck!

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.

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

If it's on the Internet, it must be true.

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

Wikipedia articles are not considered complete. In fact, all are regarded as works in progress because they are continually being updated, modified and corrected. This is contrary to articles in hardcopy (print) encyclopaedias and is possible because of the ever-changing nature of the web. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy