Introduction to HTML


What is HTML?

HTML documents can be created using any word processor. You can either use existing word processors like Notepad or WordPad can be used by Windows users and TextEdit can be used by Mac users or download and use text editors like Visual Studio Code, Brackets, Atom or Sublime Text.
To save it as an HTML document, add the .html or .htm extension after the specified filename.
Navigate to the file location of your HTML document.
Click 'Open with'.
  • To view this file, you may open it with any web browser available on your device (Google Chrome, Mozilla Firefox or Apple Safari).
  • You can further edit the HTML file by opening it with text editors.

HTML is a Tag based language.

A tag is an element that tells the browser what it must show and how it can be shown.



Each tag giving a specific instruction is enclosed in angle brackets < > .


Opening and closing tags.

Click here to learn more about HTML Tags.

You can use the different attributes of tags that contain additional information, such as formatting effects, alignment and so forth.
The attributes appear inside the opening tag and their value remains within the quotes.


What is an Attribute and a Tag?

Structure of an HTML document

An HTML document starts with <html> tag and ends with </html> tag. This makes it identifiable as a standard HTML document.
The overall framework of an HTML document is divided into two parts:

Head : The <head> tag indicates the header of the HTML document. It lies just below the <html> tag and contains details about the webpage.

Body : <body> tag contains the text that appears on the web page with additional tags and attributes. In the body tag, we use formatting elements, images, lists, tables, hyperlinks to enhance the appearance of a web page.

Note that only the content written within the body tags will appear on the web browser.


<HTML>
<HEAD>
<TITLE> TITLE </TITLE>
</HEAD>
<BODY>
This space contains the text to be on your web page.
</BODY>
</HTML>
HTML, HEAD and BODY tags.

Home

Next