HTML, or hypertext markup dialect, is exceptionally easy to take in and extremely easy to utilize. HTML is utilized as a part of most current sites. HTML has two fundamental structures:
<name attribute1="value1" attribute2="value2">Content of 'name'</name>
and
<name attribute1="value1" attribute2="value2">
After you learn the basic form of HTML, you are ready to do some HTML coding. And just so you know, the
capitalization of the name's of the basic structure and the attributes does not matter, while the capitalization of the
values and contents of them do.
HTML pages always start with a DTD, or document type definition. This allows the web-browser to determine what
type of HTML you are using as well as what language the characters are in. The type of DTD that I would
recommend is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
After the DTD, you would continue with the HTML tag, like so:
<HTML>
...
</HTML>
HTML pages are broken into two main sections: the HEAD and the BODY, both contained within the HTML tags.
The head contains the title and sometimes meta tags. The body contains the main page that everyone sees. A typical
website looks something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
...
</HEAD>
<BODY>
...
</BODY>
</HTML>
Page Title
The title is the most important element of a quality web page. The title allows people to know what they are visiting
and represents the page. When search engines add your website to their database, they add the title as what you see
when searching for what you want. Page titles are very useful for letting your guests know just what is on you
website. There can only be one title per page, so only the first code read containing the title will be shown. In order
to add a title use the following code:
<TITLE>this is the title</TITLE>
Please note that this is one of the tags that will go within the HEAD tags. Here is an example of a web page:
Simple Headings
There are six different simple headings that can be used (H1 to H6). Many websites use headings. You can use the
following code to make headers.
<H1>This is the Heading</H1>
<H2>This is the Heading</H2>
<H6>This is the Heading</H6>
Of the six different headings, <H1> produces the biggest, and <H6> produces the smallest. You can also center the
headings by using the align attribute, as you can see here:
<H1 ALIGN="center">This is the centered Heading</H1>
Paragraphs
Paragraphs are very useful and should be used. They can be created by using the following code:
<P>This is a paragraph.</P>
<P>This is a second paragraph.</P>
New Lines/Spacing
New lines are very important for making any website. In order to create a new line you would add the following
code:
<BR>
Spacing is also very important. When using HTML, you can use just a space, but only up to the first space. Beyond
the first space, the web-browser will just ignore. In order to do any amount, you must use the following code for
each space wanted:
Horizontal rules
Horizontal lines can be added by doing the following code:
<HR>
You can also change the width of the line as well as align them to the left or right, as can be seen here:
<HR ALIGN="left" WIDTH="50%">
Please note that you can have the width in pixels instead of percentages as well. You can also change the height in
pixels by doing the following:
<HR SIZE="5">
Comments
Comments are very useful for people that want to identify things in their HTML. They are used when multiple
people update website. They are also used to "block" the HTML code. The user does not see a comment unless they
view the source code. You can add a comment by doing the following:
<!-- This is the comment -->
"News powered by"
No comments:
Post a Comment