How to Convert Words & Text to HTML

How to Convert Words & Text to HTML thumbnail
Learning HTML codes allows you to make words and text appear on a website.

Basic HTML codes are all that is necessary to make words and text appear on a text-based website. Many word processing programs today have automatic converters that will save a document as an HTML file, but those programs often introduce unnecessary formatting codes. Knowing how to code words and text from scratch will put you on the path to understanding how HTML works.

Instructions

  1. Create the HTML file

    • 1

      Open a basic text editor. Find the most basic editor on your computer. While full word processing programs such as Microsoft Word are powerful and user-friendly for most tasks, creating basic HTML requires simplicity. It's often easier to work with a bare-bones text editor that comes with your computer's operating system. Look for Notepad in Microsoft Windows or TextEdit in Mac OS.

    • 2

      Type "<html>," then hit return twice and type "</html>." Basic HTML tags are always surrounded by the "<" and ">" symbols. The first tag of an HTML code tells the web page to begin a task, and the second tag, which contains a slash (/) before the command, tells the web page to finish that task. These are commonly referred to as opening tags and closing tags, respectively. By typing "<html>" and "</html>," you are telling a web browser that there is HTML content between the two tags.

    • 3

      Type "<body>" after the opening HTML tag, then hit return twice and type "</body>" before the closing HTML tag. These body tags tell the browser that whatever text is between them should be visible on the page.

    • 4

      Type the text you would like to display between the body tags. Don't worry about any other coding; just type the text as you would normally in a word-processing program, such as Microsoft Word.

    • 5

      Perform basic formatting on the text as it is entered. Wherever you would like a paragraph, enter "<p>" before the first word in the paragraph and "</p>" after the final word. To make a word or words bold, type "<b>" where you'd like the bold to start and "</b>" where you'd like it to end. Similarly, use "<i>" and "</i>" to create a word or section in italics. There are many more formatting commands you can learn to use as you become more proficient with HTML coding.

    Check and edit the HTML file

    • 6

      Save the file. Name it whatever you choose, but make sure to end the name with ".html" to tell the browser that it's an HTML file.

    • 7

      Open the file in a browser. Since you named the file with the ".html" extension, your computer should recognize it as a web page. If it does not, right-click the file and choose "Open with," then select your preferred web browser, such as Internet Explorer or Firefox. You should now see the results of your HTML code.

    • 8

      Edit the file as necessary. If you'd like to make changes, right-click the file, choose "Open with" and select your basic text editor. Now you can manipulate the HTML codes and text again.

Tips & Warnings

  • Opening your page in a web browser does not mean that page is on the Internet. It is simply reading a file on your computer. To post the page to the Internet, you will need access to a web server or other hosting platform that accepts HTML pages.

  • If you do not put "<p>" and "</p>" tags around your paragraphs, they will all end up in one block of text together.

Related Searches:

References

Resources

  • Photo Credit computer frame image by David G from Fotolia.com

Comments

You May Also Like

Related Ads

Featured