HTML
WEB DESIGN
GUIDE – SIMPLE
TEXT CONCEPTS
- Add a sentence inside the body section of the HTML
template. (New additions will be
shown in blue.)
<html>
<head>
<title>My Page</title>
</head>
<body>
Mr.
Campeau is extremely cool.
</body>
</html>
|
- Save your document and view it in your browser. You should see your sentence.
- Try adding a second sentence below the first one.
<html>
<head>
<title>My Page</title>
</head>
<body>
Mr.
Campeau is extremely cool.
The
teacher is very smart.
</body>
</html>
|
- Save your document and view it in your browser. What do you notice?
EXPLANATION: Your browser ignores most whitespace (spaces &
enters). Any series of spaces are
reduced to one space. All enters
are completely ignored.
- If we want to force an enter, also known as a line
break, we can use the <br> tag. Try it and open your saved document in
your browser!
<html>
<head>
<title>My Page</title>
</head>
<body>
Mr.
Campeau is extremely cool.<br>
<br>
The
teacher is very smart.
</body>
</html>
|
GOT EXTRA
TIME?
- If you need to put multiple spaces side by side, you
need to use a special code for the space character. The code is:
- Try adding five space codes between any two words. Test your code in your browser.
<html>
<head>
<title>My Page</title>
</head>
<body>
Mr.
Campeau is extremely cool.<br>
<br>
The
teacher is very smart.
</body>
</html>
|
|