Poll
| HTML 102 - Paragraphs and Line Breaks and More |
|
|
|
| Written by Administrator |
| Saturday, 30 January 2010 23:55 |
|
Today we tackle the next bit of HTML basics, the follow-up to my previous post. (If you forget along the way, you can always backtrack to the previous lesson for a quick refresher.) We already talked about the makeup of a simple HTML page. Chances are pretty good you did it and weren't impressed. If you did the page right, you opened it up and all you saw was what looked like a text file with the words, "My, but this is easy!" Thing is, when you upload a page to the Internet, and you want to display text or pictures, you've got to use another language - not just text. That's what the brackets are about, the "<" and the "/>". Those brackets and what you put inside of them tells an Internet browser how to interpret, or parse, the page. It turns that coded gobbledygook into colors, pictures, and so on. We'll backtrack a little here because like a lot of things, HTML is simpler to learn if you do it in little bites. Kind of like jalapeños, if you like them. You didn't go straight to jalapeños at age 2 and gobble them down like candy. You built up from your mom's barely-spiced chili, then to mild green chilis, then to Pace's medium picante sauce. Just never, ever to those little habañeros that are in actuality Mother Nature's equivalent to the Atom Bomb. Okay, maybe that was just me, but the principle is the same. It's all about baby steps. When you are typing merrily along and want to create a line break for a new paragraph, HTML has its own shorthand. For paragraph (which is basically a double-line break) the coding is just "P". Of course you put that P inside brackets, like all good HTML. So if you're writing text in HTML, your text would read like this:
The rain in Spain falls mainly on the plain. <p>To start a new paragraph here, I need to add the instructions to tell the browser (like Internet Explorer or Firefox) that it's a new paragraph. Got it?</p>
HTML's shorthand is pretty intuitive for we who speak English. A lot of common tags (or instructions) are based on the English language - like P for paragraph, BR for (single-line) break, etc. These are some of the most commonly used shortcuts. Most require a matching close tag, the kind that includes a "slash" mark - "</your instructions>".
<p> = new paragraph
<br> = single line break <i> or <em> = italics (or emphasis) <b> or <strong> = bold
Notice that the exception to the rule is the <br> tag. Because it's a one-off instruction, a separate closing line isn't possible. However, the later versions of HTML add a closing slash inside that one line of coding, like this: </br> Next step - putting everything on the table. Or tables, as is more accurate. So far the coding has been simple. But tables, while simple, are easy to muck up. I'll make it as painless as possible. Lesson 3 - Turning the Tables on Tables |
| Last Updated on Sunday, 31 January 2010 01:11 |


