How to Create a Simple Web Page with HTML

This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.

There are 15 references cited in this article, which can be found at the bottom of the page.

This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.

This article has been viewed 4,700,128 times.

This wikiHow teaches you how to write a simple web page with HTML (hypertext markup language). HTML is one of the core components of the World Wide Web, making up the structure of web pages. Once you've created your web page, you can save it as an HTML document and view it in your web browser. Creating an HTML page is possible using basic text editors found on both Windows and Mac computers.

Part 1 of 6:

Adding a Head to Your HTML

Step 1 Open a text editor.

\nLicense: Creative Commons\n">

Windows Start

Mac Spotlight

Step 2 Type in <!DOCTYPE html></p>
<p>and press ↵ Enter.

\nLicense: Creative Commons\n">

Type in and press ↵ Enter . This tells the web browser that this is an HTML document. [1] X Research source

Advertisement

Step 3 Type <html></p>
<p>and press ↵ Enter.

\nLicense: Creative Commons\n"> Type and press ↵ Enter . This is the opening tag for your HTML code.

Step 4 Type in <head></p>
<p>and press ↵ Enter.

\nLicense: Creative Commons\n">

Type in and press ↵ Enter . This is the tag that opens your HTML head. The HTML head information that is not usually displayed on your web page. This information can include, the title, meta data, CSS style sheets, and other scripting languages. [2] X Research source

Step 5 Type in <title></p>
<p>.

\nLicense: Creative Commons\n"> Type in . This is the tag to add a title to your page. [3] X Research source

Step 6 Type a title for your web page.

\nLicense: Creative Commons\n"> Type a title for your web page. This can be any title you want to name your web page.

Step 7 Type in</title></p>
<p> and press ↵ Enter.

\nLicense: Creative Commons\n"> Type in and press ↵ Enter . This is the tag to close your title tag.

Step 8 Type</head></p>
<p> and press ↵ Enter.

\nLicense: Creative Commons\n">

Type and press ↵ Enter . This is the tag to close your head. Your HTML code should look something like this.

 html> head> title>My Web Pagetitle> head> 
Advertisement Part 2 of 6:

Adding a Body and Text to Your HTML

Step 1 Type in <body></p>
<p>below the closed

\nLicense: Creative Commons\n">

Type in below the closed "Head" tag. This tag opens the body of your HTML document. Everything that goes in the HTML body displays on the web page. [4] X Research source

Step 2 Type in <h1>. \nLicense: Creative Commons\n"> Type in . This is the tag to add a heading to your HTML document. A Heading is large bold text that typically goes at the top of your HTML document. [5] X Research source

Step 3 Type a heading for your page.

\nLicense: Creative Commons\n"> Type a heading for your page. This can be the title of your page or a greeting.

Step 4 Type</h1></p>
<p> after your heading text and press ↵ Enter.

\nLicense: Creative Commons\n">
h1>Welcome to My Page!h1> h2>My name is Bob.h2> h3>I hope you like it here.h3> 

Step 5 Type .

\nLicense: Creative Commons\n"> Type

. This is the tag to open a paragraph. Paragraph text is used to display normal sized text. [6] X Research source

Step 6 Type some text.

\nLicense: Creative Commons\n">

Type some text. This can be a description for your web page or any other information you wish to share.

Step 7 Type</p></p>
<p> after your text and press ↵ Enter. \nLicense: Creative Commons\n">

Type

after your text and press ↵ Enter . This the tag to close your paragraph text. The following is an example of paragraph text in HTML:
p>This is my paragraph.p> 
b>Bold textb> i>Italic texti> u>Underlined textu> sub>Subscript textsub> sup>Superscript textsup>