HTML: Applying bold and italic formatting

This entry is part 3 of 34 in the series HTML

Applying bold and italic styles are two ways of making text stand out and attract attention.

For simple boldface and italics, use the <b> tag and the <i> tag.

<!DOCTYPE html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Bold & Italic</title>

<p>I have like to go to <b>Thailand</b> for fun.</p>
<p>And to have some <i>great times</i> there.</p>


Here I have used lang=’en’ to state that the page is using English language as its default language.

Here I have also used <meta charset=”UTF-8″> for character encoding.  This is recommended by W3C for use in HTML and XML.

UTF-8 has basically become the dominant character encoding for the World Wide Web.


Series Navigation<< HTML: Heading and paragraph
HTML: Images >>