HTML5: How to define important text?
Solution:
HTML Code:
<!DOCTYPE html><!-- Define document type as HTML -->
<html><!-- Begin HTML document -->
<head><!-- Start of document header -->
<meta charset="utf-8"><!-- Define character encoding -->
<title>How to define important
text</title><!-- Title of the HTML page -->
</head><!-- End of document header -->
<body><!-- Start of document body -->
<strong>We are learning HTML strong
element.</strong><!-- Strong element used to emphasize text -->
</body><!-- End of document body -->
</html><!-- End of HTML document -->
Explanation:
- This HTML code defines a webpage with a sentence about learning HTML.
- The <strong> tag is used to define important text within the sentence.
- The text "We are learning HTML strong element." will be displayed with stronger emphasis compared to surrounding text, typically rendered in bold by browsers.
- The <strong> element is used to convey importance or emphasis to the enclosed text, and it is often styled to appear bold by default, although the actual appearance can vary depending on the browser and user settings.
Live Demo:
See the Pen strong-answer by w3resource (@w3resource) on CodePen.
See the solution in the browser
Supported browser
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/html-css-exercise/basic/strong-answer.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics