Creating a blog in HTML is a simple way to have a blog you can update in any text editor. Blogs have several elements in common that are easily produced in basic HTML.
Each blog post should appear above the last, have a title, date, and content. Using HTML comment tags, the code for the blog posts stays in the page but is unseen until it is used for an actual post. The code is copied from the comment tag section and pasted on the page above the last blog post. Then, the code is filled in with content.
Step 1
Open the text editor and create a new file by clicking on “File” and “New.” Every computer comes with a text editor. A Windows PC uses Notepad.
This is found under “Applications” in the Start menu. Mac PCs have Text Edit. To open Text Edit, open Finder and click on “Applications”. Scroll down to the Text Edit icon and double click to open.
Step 2
Create the web page by typing in the basic HTML tags for the page. For example:
Step 3
Use the largest heading tag to give the page a title. The heading tags start with h and end in a number with 1 being the largest. For example:
My Blog
The style element uses CSS elements to center the title on the page. Headers also leave a double space after them.
Step 4
Create the blog post code by using smaller header tags and paragraph tags. For example:
My First Post
June 1, 2010
This is a post
The EM tag italicizes the text. The break or BR tag puts a line break after the date. The P or paragraph tag puts a double line break after a block of text. The HR tag puts a line across the page after the paragraph.
Step 5
Copy the code for the blog post and place it before the first post. Place the code in the comment tag. The comment tag is . The page in the example will now look like:
My Blog
This is a post
–>
My First Post
June 1, 2010
This is a post
The comment tag makes the unused code invisible to the browser. To use it for a blog post just copy the code and remove the comment tags.