Here's the minimum amount of tags you'll need to create a basic HTML document:
This is text.
So let's say you want to create a paragraph, what would you use? Well <p> yes, this is the paragraph tag, it works like this:
and so on ... This will create a new paragraph and the then you can begin typing in the text, end each paragraph tag with a </p>. Keep in mind, small errors in your HTML will show up when you want to verify your HTML, and there's things online that will verify your page, Google it.
What if you want to create large text? Small text? Okay! <h> tags = header tags, these will create larger or smaller text, but don't just use "<h>" this isn't an HTML tag, you'll need to document the value. So:
This will create a very large n00bish text on the page, go see. Open notepad, type it in, save as "index.html" and you'll see what I'm talking about. It can go from:
<h1> largest text
<6> smallest text, got it?
So what if you want to break a line, but don't want to create a new paragraph?
Good question. A <p> tag creates a space in between the next paragraph, but a <br> tag just breaks the line and continues to the line right below, try it out in Notepad.
It has some purposes sometime's, I don't know, it's good if you don't want your text going across the screen of a site, but you don't want a new paragraph as well.
You can even leave yourself notes inside an HTML document, only you [and someone that views source] can read, you can do this by:
<!--Hmmm--> This will create a note to yourself, maybe you want to remember something.
Using <p> to create new lines is a bad habit, so use the <br> code instead, keep this in mind.
Another nice tag is the <hr> tag, it will create a line to create a new section in your site, it's pretty cool. You should try that out. This way, you can segment your site in different sections.
How do you center your site?
Okay, I'll show you. Let's say you want a "normal" large heading /// smaller text site, you'll need to use the following codes:
Basically, you created a large heading, you aligned the text to the "center" and a <p> tag was used to create the body of the HTML document. Simple, eh?
How do I create background color?
Ohh want background color to your site, huh? Okay!
<h2>Cool, it's Red!</h2>
Check it out. <body bgcolor="red> translates to the background (bg) color of the site will be red, and the <h2> is merely the size of the text that I used, this was explained earlier.
k. This was part 2, stay tuned for part 3! :D
Programming HOW TOs and in-depth guides for programmers of all levels. Programming is an essential skill for hackers, so start learning today!
1 post • Page 1 of 1