Skip to Content
buy propecia advice disguise 7 homebuy erythromycin Simply Yourself mallbuy femara conscious patient Obviouslybuy retin a remaining Battery partbuy tetracycline proverb A transcendingbuy cipro 2 Organization glossbuy finpecia tiny Cannot Holds uniquelybuy cymbalta chair headachesThatbuy medrol recover overly spend there

Creating a Basic Web Page Is Easy!

Right, I’ve heard that line before.

Any page on the web—no matter now media-rich it appears—is, at its core, a small, text-only document. The document may contain links to images or to videos that the browser retrieves to create the media-rich page you see, but the core web page—the document ending in .html—is all text.

Your browser (whether you use Internet Explorer, Firefox, Chrome, Safari, or some other browser) is simply a program on your computer that interprets the HTML code in these text files, combines text with media files, and creates pages.

Okay, let’s begin getting things done!

1. Open up a plain-text editor. On Macs, the default is TextEdit; on Windows, Notepad.

If you are working on your own computer, you may want to download and install TextWrangler (Mac) or Notepad++ (PC). These free programs are better in many ways than TextEdit or Notepad. They have nice features, such as color coding HTML tags, showing line numbers, and auto indentation—all of which are really handy and speed up the coding process.

Important! Whatever you do, do not use a word processing program like Microsoft Word. The content produced in Microsoft Word does not play well with web browsers and should be avoided at all costs when you are creating your own pages. Use the proper tool for the job: use a text editor, not a word processor.

2. Now you are ready to begin creating your web page. Type the following in your text editor:

Hello World!

3. Save that file as webpage.html. (Note: if you are using Windows Notepad, you will need to change the “save as” file type to “All Files.”) Be sure to type the extension “.html” All files on the web must have an extension. Your browser uses the extension to determine the file type (html, image, video, etc.) Without an extension, the browser can’t process the file.

4. Open up the file in Mozilla Firefox, Google Chrome, or Apple Safari.

Important! Even though Microsoft Internet Explorer (IE) is still the most popular web browser, we recommend that you DO NOT use it as your primary browser for designing web pages. IE has always been notorious for not following HTML/CSS standards. No browser gets standards perfect, but IE is the worst at it by far. You can compose your code properly, according to what you learn in tutorials, and IE will sometimes not display it correctly. Even though if you become serious about web design, you will have to learn to code for IE’s idiosyncracies, using IE is very tough on new designers trying to learn the basics of HTML/CSS. It’s like having a teacher who marks your answers wrong when they are, in fact, correct.

5. Using the menu in your web browser, choose “File > Open” and select webpage.html.

The words “Hello World!” should now display in your browser. Congratulations! You have created your first web page!

Now let’s add to it. After all, most web pages have more than one sentence. Open your webpage.html file, add a line return, and type a paragraph about your new web page. Something like this:

Hello World!

This is my first web page. Once I'm done creating it, I'll be able to brag to everyone that I know how to code HTML and CSS, and before long, I'll be creating my very own stupendous website!

Save your file and open it again in your web browser, or if your web browser is open to the file already, you can hit “refresh” (CTRL-R: you must refresh because your browser won’t know that you have updated the file).

The problem is that the browser will display your two paragraphs something like this:

Hello World! This is my first web page. Once I'm done creating it, I'll be able to brag to everyone that I know how to code HTML and CSS, and before long, I'll be creating my very own stupendous website!

The line break is gone. That’s because we need to use HTML to tell the browser about the structure of our document: in this case, that there are two distinct paragraphs.

There is a predefined set of HTML tags (or terms) that makeup the HTML language. Your job as a HTML coder is to pick the one that most accurately describes the function of the content. It is a heading? A paragraph? A list? A link?

In this instance, we need the paragraph tag: <p>. Note that every HTML tag is specified with angle brackets. Add a <p> “opening” tag to the beginning of each paragraph and a </p> “closing” tag to the end of each paragraph. The “/” in the closing tag tells the browser that the paragraph is finished.

NOTE: You can learn more about the <p> tag at W3Schools; in this section, we’ll frequently link to HTML definitions at W3Schools or HTML Dog so that you can learn more about HTML on your own and so that you can begin using these sites as resources. Consider W3Schools’s and HTML Dog’s HTML reference pages as invaluable “dictionaries” of terms; you won’t be able to learn the language of HTML (or CSS) without such references.

Assuming that you have typed everything correctly, your file should now look like this:

<p>Hello World!</p>

<p>This is my first web page. Once I'm done creating it, I'll be able to brag to everyone that I know how to code HTML and CSS, and before long, I'll be creating my very own stupendous website!</p>

Save your file and refresh your browser, and voilà! You’ve told the browser that those are separate paragraphs, and it now displays them with default paragraph formatting

Hello World!

This is my first web page. Once I'm done creating it, I'll be able to brag to everyone that I know how to code HTML and CSS, and before long, I'll be creating my very own stupendous website!

If for some reason your HTML didn’t work like it is supposed to, check for typos. Also check that each of your opening tags <. . .> has a closing tag </. . .>. A web browser is a much more strict grammarian than a writing teacher, and the least little error in adding HTML tags can make your document wonky.

Next, let’s add a headline to the page: My First Web Page. To do so, at the top of your webpage.html file, type:

<h1>My First Web Page</h1>

This tells the web browser that “My First Web Page” is the top level heading on a page. Usually coders will reserve <h1> for the major headline on a page and then use <h2><h3> etc. for subheads, much like an outline or a table of contents where <h2> is used to tag all the primary sections of a document and <h3> is used to tag the next level of subsections.

NOTE: Even though you can go up to a <h6> level of subheads, we recommend that should you ever feel the need to go beyond an <h3> subhead, you split your content into more than one page instead.

Anyway, save your file and view it in a web browser. See how “My First Web Page shows up larger with emphasis, much like this?

My First Web Page

Hello World!

This is my first web page. Once I'm done creating it, I'll be able to brag to everyone that I know how to code HTML and CSS, and before long, Ill be creating my very own stupendous website!

There are many more tags that you should use to “describe” your content in HTML. For instance, <strong> . . . </strong> around a part of text in a paragraph denotes strong emphasis (usually styled with bold type). <blockquote>. . . </blockquote> is used to tag—yes, you guessed it—a long quote that should be indented or otherwise emphasized. Then there are tags for constructing lists and tables, for making hyperlinks, and for inserting images, to name a few.

But before we move on to CSS, this web page is not quite done yet. Take a look at the following code that is similar to what you will find on most web pages:

<!Doctype html>

<html>

<head>

<title>Untitled Document</title>

</head>

<body>

</body>

</html>

The first line with the <!Doctype>  tag tells the web browser that you are using “html” which means you are using the latest version of HTML, HTML5. As you study and learn new HTML tags, be sure that you are learning the ones supported in HTML5. Using older tags can result in strange and difficult to diagnose problems.

The content in the <head>. . .</head> is metadata about your web page that provides information to the browser. Right now, all we have specified is the document title, but there is other metadata that could be useful to specify once you become more advanced at coding. For example, you might want to use the <meta> tag to add a description for your website. Google will use the description you provide there when displaying your main website home page in search results.

Between the <body>. . .</body> tag goes the content that will be displayed to your readers. In other words, the main content that you write goes here.

So copy this code over to your webpage.html file and then move the content you have created in between the <body> tags like so.

<!Doctype html>

<html>

<head>

<title>Untitled Document</title>

</head>

<body>

<h1>My First Web Page</h1>

<p>Hello World!</p>

<p>This is my first web page. Once I'm done creating it, I'll be able to brag to everyone that I know how to code HTML and CSS, and before long, I'll be creating my very own stupendous website!</p>

</body>

</html>

Now save the file and view it in your web browser. It should look just that same as before. You won’t notice the benefits of fully specifying the HTML page in this way until you get further along in your coding skills. But for now, if you look at the source code of a web page, you’ll have a better understanding of the major elements that frame the text.

Finally, there is one last thing to do. See where it says “Untitled Document” in between the <title> tags in your HTML code? You need to change that to the title of your web page, to look like this:

<title>My First Web Page</title>

Once you have done so, save your file and view it again in your browser. Now you’ll see that the title of your web page shows up in the top bar of the browser window. Search engines will also use this to help index your website. (See Every Page Needs a Title for more on on the rhetoric of page titles.)

There are certainly many more HTML tags worth knowing about in order to properly markup your content. To learn more, begin either W3Schools’s HTML Tutorial or HTML Dog’s HTML Beginner Tutorial; they can take you from here.