HTML Underline - CSS Tips
An HTML underline typically indicates a link in Web design. However, there may be times when you want to use HTML underline, or other HTML codes, to spice up your Web site and draw attention to certain text.
HTML Underline Code
The HTML underline code is <u>text you want to underline here</u>. You always need the brackets to enclose HTML coding, so that browsers know the enclosed text is HTML code. A slash is used in the end bracket to close HTML codes. Without that slash, every word would be underlined.
Should You Underline?
It’s generally accepted among Web designers that you never want to underline text on a Web page. This is because underlined text typically indicates a link. If you underline text on a Web page, most users are going to assume they can click the text to go to another page. They may be annoyed or think your page is defective if clicking doesn’t work. Use bold or italics codes to emphasize text without misleading visitors.
HTML Bold Code
The HTML code to bold text on a website is <b>text you want to bold here</b>. Note that like the underline text, the bold code is enclosed in brackets, and the end code has a / to denote that it is the end of the bolded section. If you forget to put the / in the end tag, the rest of the text on the page is bolded.
HTML Italics Code
The HTML code to italicize text on a website is <i>text you want to italicize here</i>. Again, enclose the tags in brackets and always include an end tag. Italics may be more difficult to view in some fonts, so it’s not as versatile as bold text.
HTML Link Code
The HTML code to create a link on a Web page is <a href=”http://yourlinkhere”>link text</a>. This is an example of an attribute code that contains additional display or functional information for a Web browser. The name of the attribute is "a href," and the value is enclosed in quotation marks. Like all HTML codes, you need a slash in the end tag to denote the end of the link.
Using CSS
There are alternate ways of coding underlines, bold and italic text in CSS.
- For italics, use <em>yourtext</em>
- For bold, use <strong>yourtext</strong>
- For underlining, use the attribute text-decoration: underline (this attribute can appear in line with the text, or as part of a global style sheet)
Using CSS with properly coded HTML can save time and improve the appearance of your pages. Newer Web browsers are optimized for CSS and use built-in text rendering features to make things more readable. If you're getting bad results with standard bold or italics in HTML, try using the CSS equivalents.
HTML Articles, Videos & HowTos
An HTML underline is easy to create, but you might annoy visitors to your page if you don't use it carefully.
Knowing basic HTML is a must if you're blogging or building a Web page. Even though HTML editors make it easy to code, knowing how code works can save your page when things don't look the way they should.
The HTML definition changes over time as technology improves and new ways of using the Web emerge. Learn where you can find information about the latest HTML standards.
What does HTML mean anymore? With the advent of multiple alternative Web programming languages, is HTML still relevant?
Ask most people, "What is HTML?" and they'll tell you it's a language for page design. In reality, this is far from the truth.


Mindspark properties: