Page Structure
As previously mentioned, an HTML document is just a set of tags within other tags. Here's a better way to visualize that:Tags
HTML markup tags, more commonly known as HTML tags, are keywords, or tag names, surrounded by angle brackets < >. Most of the time, these tags will come in pairs. The first tag, also known as the opening tag, is written as a keyword surrounded by two angle brackets, like <html>. The second tag, or the closing tag, is written with a forward slash before the tag name, like </html>.
<tagname>content</tagname>
Headings
To create a heading, you can use tags <h1> to <h6>. Headings are displayed with a font size larger than that of the default font, and the number within the heading tag specifies the level of heading being used. As the number increases, the font size decreases. For example:<h1> Heading 1 </h1> Heading 1
<h2> Heading 2 </h2> Heading 2
<h3> Heading 3 </h3> Heading 3
Paragraphs
These ones are easy. Just use the <p> tag:
<p>paragraph</p>
Links
If you want to display a link, you'll use the <a> tag, but with a slight edit to the full tag name. After the "a" in the opening tag, you'll type href="linkhere", replacing the linkhere with your link address.
<a href="linkhere">Link</a>
Images
Images work similar to links, in that you'll slightly change the opening tag, which is <img> in this case. The full opening tag will look something like this:
<img src="imagehere.jpg" alt="alternatetext" width="100" height="100">
You would replace the imagehere.jpg with your image's file name, and the 100's with whatever size you want to specify. I won't completely describe the alt="alternatetext" quite yet, as attributes are going to require another lesson, but basically, whatever replaces alternatetext will appear if the image doesn't load.

No comments:
Post a Comment