How to write HTML Code

How To Write HTML Code

Writing HTML Code is very simple. HTML uses markups or tags to display the content on the browser. HTML code is written inside the .html file. You can also write HTML code in .php file or .asp file.

How To Write HTML5 Code

Before writing HTML you should know that HTML5 is the latest version of HTML. HTML5 is now the standard of writing HTML.

The standard template of HTML5 is shown below.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>The HTML5 Template</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
</body>
</html>

This is the basic HTML5 template.

Writing HTML Code

Writing HTML Code is very easy. If you are a beginner then you really don't need anything complex or professional. For now a simple text editor like Notepad (For Windows) or Textedit (For Mac) is more than enough.

How To Write HTML Code in Notepad

Beginners can use Notepad for writing HTML Code. For Windows you can find Notepad in Start Menu, simply search Notepad there and you will find it. Open the Notepad and write the HTML5 standard template as shown above.

Save this HTML code file with .html extension and view the output in browser.

How To Write HTML Code on Mac

If you have mac, you can write HTML code in TextEdit. TextEdit is as simple as Notepad. For Mac open Finder and in Applications you can find TextEdit. Change the preference settings to the plan text, for that go to Preferences and then Format.

Simply write your first HTML code in TextEdit and save the file with .html extension.

The HTML code given above is the simple HTML5 template. To display more content on your browser screen you would have to use more HTML Tags or Elements.

You can find list of all HTML Tags here. These tags combine together to form what we call HTML Code.

That HTML Code then displays your content on website or web page and make the structure of website.