HTML basics

From Conservapedia
Jump to: navigation, search

HTML is a basic programming language used for creating largely static webpages and websites. The latest standard is HTML 5. It offers many options, but here are some basics needed for creating a minimal webpage. The first thing anyone needs to know that tags are marked like <this> every time. When there is content inside, a tagged section must also be </closed> with the same brackets, but also with a forward slash before the tag name.

Creating a File

First, one must create a text file with the file extension of .html and open it in any text editor, like Windows Notepad. Now it should be declared as a HTML file by placing
<!DOCTYPE html> on the first line. On the second line, place
<html> to open the HTML section of the file, which in this case will be the only major section created.



Now, it must be set up properly. To begin, a header section must be created by placing the
<head> tag on the third line. Inside the header, other tags may also be included which provide information about the page or configure settings for the loading and display of the page. One item which should always be included is
<meta charset="utf-8" /> If one wishes, they can change the charset value, but if they do not know what this does, simply using utf-8 should produce the desired goal.
Other items may be added as well, such as
<title>Title Goes Here</title> and other meta data, including
<meta name="Author" content="Your Name" />
<meta name="viewport" content="width=1024" />
<meta name="Description" content="Site description goes here" />
and even
<style>...</style> which can be used to contain all manner of stylistic settings applied to certain tags and classes. If an individual is just starting to learn HTML, however, this will probably not be useful to them yet. When the head section is complete, close it with
Nothing is permanent, of course, and the header can always be revised. If the style tag is used, one will frequently need to revisit the header for this reason.


The body section is where the main webpage content is placed which will be displayed to the user. First, the body section needs to be opened, so <body> must be used next. There any many tags which may be placed inside here, but the most common are probably
<div> (used to make divisions and sections)
and text containers, such as <p>, and header tags (<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>) <a href="">Link Name<a> uses the anchor tag to create a text link to another page or website.
For a beginner, simply using a header tag then the paragraph tag to place text on the page in common. At the end of the body section, close it with


The footer is often left empty, and does not have a tag to set it apart as a section. Experts sometimes use this section, but for a beginner, it usually should be left empty.

Finishing and Improving the File

When the file in complete or ready to be tested, simply close the html section using
</html> Now it may be opened with any web browser. For a beginner, trial and error may prove beneficial. Also, researching more HTML tags and code can prove very helpful. Once a framework is ready, improvement and testing is much simpler.

External links