MAT 125: Demos for Exercises

Exercise 1 Demo: Part D : Using Inline HTML Style Elements & the Comment Element

Inline Elements add style to the text. They do not start a new line. They are physical style tags.

Here is an example of how you could use the inline HTML style elements. Add the example of your own content to your index page.

<!DOCTYPE html>

<html>
<head>
<title>
My First Web Page </title>
</head>

<body>

Be sure to start every HTML document correctly, using the code above. Write your code in lowercase.

Using HTML Text Styles or Inline Elements

This part of the demo covers Text Styles or Inline Elements. Use the following elements to enhance your text. Enclose the text you want enhanced inside a pair of these tags and see what happens. It can be a whole line of text or paragraph or just one letter.

The first two elements are used primarily for voice activated browser for the sight impaired, which is becoming an important issue. The way these elements is previewed varies depending on which browser you are using.

<p>This element <em> emphasizes text </em> in some way. It makes content italic.</p>

<p>This style element <strong> also styles text </strong> in some way. It makes content bold.</p>

</body>

</html>

Using HTML Comments

Use the HTML Comment Element to write notes to yourself in your code. Write a questions to me in your homework. Leave notes for when you come back to a website later. All sorts of uses for the Comment Element.

<!--A comment looks like this - but it does not really show up on the page. Use it to write notes to yourself in your code. -->


Give the browser some more instructions. Go to Part E of Demo 1.