h1 to h6 for headings
The em tag renders as italic
The strong tag renders as bold
ul tag for unordered list with bullets.
Each item needs the li tag
ol for an ordered list
use img src="" tag for images
Normally, don't hotlink. But I'm sure crouton.net won't mind.
If you want to go back to top of page, give the first paragraph an id of #top and then create a link to it with a href=#top.
Remember to indent nested elements by 2 spaces.
Browsers ignore anything with a comment tag. Useful for actual comments, and for disabling code without removing it.
They work a bit different than most tags. Enclose the entire comment in lessthan!-- and --greaterthan.
Don't forget to close your body and html tags at the end of your document.
Oh boy, tables. The entire table has to be enclose with the table tag. Each row must be inside a tr tag. And each CELL in a td tag. Unless it's a header, then it should be the th tag. Then for styling or neatness or whatever, make sure the entire header row is enclosed with a thead tag.
That seems like a lot of work, but now we have to do the rest of the table. Enclose it with the tbody tag, I guess. Then if you want a footer for totals or whatever, enclose it in the tfoot tag.
Monday | Tuesday | Wednesday | Thursday | Friday |
---|---|---|---|---|
Eggs | Sausage | Pancakes | French Toast | Bacon |
Hamburger | Hot Dog | Tacos | Spaghetti | Pizza |
Steak | Lasagna | Stew | Chicken Alfredo | Chili |
1 | 2 | 3 | 4 | 5 |
None of this is very helpful until we learn how to style each of those table elements in CSS
Next, we have the form tag. This is used to gather user input and send it somewhere. We haven't gone over exactly how that part of it works yet, but it invovles the "action" and "method" attributes. I assume we'll go over that in more detail later...
There are several types of inputs you can add (nested) to forms. Text, password, number, range, checkbox, and radio, for instance.
So, if you do an input type="text", it will look like this.
Text is the default type, so you could leave that part out, I suppose. Incidentally, you can also add default text to the form with value=""
But it's not the light gray kind that disappears when you start typing.
Use the "password" type to obscure the input on the screen.
You can also do just numbers.
I can still type text into that. Maybe it just tells which onscreen keyboard to load? We'll figure it out.
Next is type="range"
That gives you a cute little slider.