You can format your Web pages using one of two categories of text style: physical and logical.
Physical text styles are newer styles found in HTML versions beyond version 2.0. They can be ignored by some browsers. Logical text styles are part of HTML 2.0 and can look exactly like some of the physical text styles. The difference between the two text styles is that when viewed in older browsers, most of the physical text styles would be ignored.
Work with Physical Tags
- Start a Word processor (such as NotePad) and type the phrase IconLogic's Web Site Development Basic
- Click in front of the word IconLogic's
- Type <B>
- Click after the word Basic
- Type </B>
- Click in front of the phrase "Web Site Development"
- Type <U>
- Click just to the left of (in front of ) the </B> tag you typed
- Type </U>
The tags you just typed, if viewed via a Web browser and assuming the page contained the minimum HTML tags such as the HTML and BODY, will turn your text bold (<B>) and underlined (<U>).
Combining the bold and underline tags the way you did is known as nesting. Remember to type your tags in reverse order when nesting. In other words, you typed the bold tag, then the underline tag, then the stop underline and then the stop bold.
Work with Logical Tags
- Click in front of some text and type <strong><EM>
These two tags will display as bold and italic via a Web browser.
- Click after the text and type </EM></strong> to close the tags
Keep in mind that text tagged with logical tags will typically look identical to physical. However, while they look the same, there is a difference. Not all browsers will display logical styles the same way. You may expect the text to be bold, but end up with plain text that has a different color. On the other hand, if the browser doesn't support physical styles, the text might not get any formatting at all.
Want to learn more about HTML? Attend our HTML Basics class. Click here for more information.
Comments