Creative Commons<\/a>\n<\/p><\/div>"}, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u, consider supporting our work with a contribution to wikiHow. And somebody use is on the normal link, some use in important navigation links, some on both. Subscribe to our mailing list to get the new updates! If the image shows on a computer but not a mobile phone, check if the style sheet has different rules for images on mobile devices. You can try the following code to underline text in an HTML page, using the tag, You can try the following code to underline text in an HTML page, using the CSS text-decoration property. wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. You'll first need to ID your image in your HTML file, then go to your CSS file, call your ID, and in the brackets, say 'text-decoration: underline;' . Underline Any HTML Element You can use the CSS border-bottom property to add an underline to any HTML element. Along with other pure styling elements, the original HTML Underline () element was deprecated in HTML 4; however, was restored in HTML 5 with a new, semantic, meaning: to mark text as having some form of non-textual annotation applied. 4 tremendous examples of HTML header tha... December 9, 2019 . with CSS (see example below). Scroll to the text to be underlined. Use the "text-decoration: underline" style. … Tip: Avoid using the element where it could be confused for a hyperlink! It's simply a … There is almost always a better way to emphasize content on a web page instead of underlining. We use cookies to make wikiHow great. Consider sprucing up your text with CSS to make it stand out. Why is the image not showing on my mobile phone while creating an HTML file? Now it represents a text different from another text stylistically, such as a misspelled word. Most browsers will display the element with the following default values: If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: This is some mispeled text.
, W3Schools is optimized for learning and training. 5. element where it could be confused for a hyperlink! All tip submissions are carefully reviewed before being published. 2. You can change this
Insert the SPAN tag before and after the text. % of people told us that this article helped them. 4. Tested. The attribute can be used with the HTML tag, with the CSS property text-decoration. Basically, these types of text underline effects are used by many websites. Mark up a misspelled word with the tag: The tag represents some text that
A Note on Usability. The
To underline a text in HTML, use the tag. text-decoration: underline;} h4 { text-decoration: underline overline;} Try it Yourself » ... HTML DOM reference: textDecoration property Previous Complete CSS Reference Next COLOR PICKER. Thanks to all authors for creating a page that has been read 155,486 times. To underline a text in HTML, use the tag. 6. To underline a text, you can also use the style attribute. While using W3Schools, you agree to have read and accepted our. To create this article, volunteer authors worked to edit and improve it over time. Tip: Avoid using the
How to underline a Hyperlink on Hover using jQuery? Please help us continue to provide you with our trusted how-to guides and videos for free by whitelisting wikiHow on your ad blocker. Define the style in your CSS. The tag deprecated in HTML, but then re-introduced in HTML5. 12 easiest examples of javascript onclic... December 12, 2019 . The tag represents some text that is unarticulated and styled differently from normal text, such as misspelled words or proper names in Chinese text. content inside is typically displayed with an underline. The style attribute specifies an inline style for an element. When a user hovers on any link then the underline appears with an animation effect, that attracts users. Actually, it's not really an under line. If you really can’t stand to see another ad again, then please consider supporting our work with a contribution to wikiHow. Learn more... Underlining in HTML used to be a matter of enclosing the text in tags, but this method has since been abandoned in favor of the much more versatile CSS. 3. The wikiHow Tech Team also followed the article's instructions and verified that they work. Instead, use the "text-decoration" CSS property. 50. It will override any style set in the HTML