1. How to make text bold and italic

1. How to make text bold and italic

Bolding and italicizing text can help to add emphasis to important words.

In (X)HTML, the <b> tag can be used to create bold text, and the <i> tag will make text italic.

1) Let's make the word "first" bold.

2) Now, let's italicize the word "everything".

The <em> tag (which stands for emphasis) and the <strong> tag (standing for strong emphasis) can usually be used in place of <i> and <b>, respectively. They may not be rendered identically in every browser, though.

3) Next, we'll use both <em> and <strong> to make the word "second" both italic and bold.

It's important when nesting tags like this that you always close the inner tags before closing the outer tags, as shown here.

In other words, <em><strong>second</em></strong> is invalid.

<b> and <i> can be nested, too, as can most other (X)HTML content tags.

4) To finish, we'll save the document and open it in our browser.

This is what the page looked like before we added the bold and italic text.

Compare that to how it looks now. Everything appears to have worked.

This completes the tutorial, and the series. Be sure to watch Part Two of this series as soon as it comes out.

  • 0 Usuários acharam útil
Esta resposta lhe foi útil?

Artigos Relacionados

2. An introduction to coding web pages with XHTML

2. An introduction to coding web pages with XHTML In this series of tutorials, you will learn...

3. How is XHTML different from HTML?

3. How is XHTML different from HTML? If you watched the previous tutorial, you'll know that...

5. Some resources you should know about before you begin

5. Some resources you should know about before you begin Before we begin, you should know...

4. Choosing a text editor for web development

4. Choosing a text editor for web development In this tutorial, we will discuss the factors...

6. How to quickly open a local web page in your browser

6. How to quickly open a local web page in your browser They may seem obvious to some, but...