What is an HTML Document? - Structure, Types & Examples

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: What is COBOL Programming? - History & Examples

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
Your next lesson will play in 10 seconds
  • 0:00 Definition Of An HTML…
  • 1:10 Types Of HTML
  • 2:40 Examples Of HTML
  • 4:40 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Speed Speed

Recommended Lessons and Courses for You

Lesson Transcript
Instructor: Szymon Machajewski

Szymon has a PhD in Education, an MS in Information Management and a BS in Computer Science. He has taught Computer Science at a number of Higher Education institutions.

An HTML document is a file containing Hypertext Markup Language, and its filename most often ends in the .html extension. An HTML document is a text document read in by a Web browser and then rendered on the screen.

Definition of an HTML Document

An HTML document is a file containing hypertext markup language. HTML code is based on tags, or hidden keywords, which provide instructions for formatting the document. A tag starts with an angle bracket and the 'less than' sign: '<'. The tag ends with an angle bracket and the 'greater than' sign '>'. Tags tell the processing program, often the web browser, what to do with the text. For example, to make the word 'Hello' bold, you would use the opening bold tag <b> and then the closing bold tag </b>, like this:


HTML is defined by the World Wide Web Consortium, an organization that regulates standards for the Internet. Each version of HTML has a set of definitions. Note that HTML is not a programming language. While we often refer to HTML markup as HTML code, programming languages require the processing of logical statements and math. HTML allows the developer to make text documents look engaging and pleasant. In most cases, programming on an HTML document is done with JavaScript.

Types of HTML

The newest version of HTML, which is entering the industry, is HTML 5. HTML can be divided into three categories: transitional, strict, and frameset. These types apply to how HTML is used, not necessarily to the selection of tags.


Transitional is the most common type of HTML. It has a flexible syntax, or grammar and spelling component. Over the years, transitional HTML has been used without syntax restrictions, and browsers support a 'best effort' approach to reading the tags. If tags are misspelled, the browsers do not correct web developers' errors, and they display the content anyway. Browsers do not report HTML errors - they simply display what they can. This is the 'best effort' concept.


The strict type of HTML is meant to return rules into HTML and make it more reliable. For example, the strict type requires closing all tags for all opened tags. This style of HTML is important on phones, where the processing power may be limited. A clean and error-free code helps to load pages faster.


Finally, a frameset allows web developers to create a mosaic of HTML documents where multiple documents can be connected into a single screen. This technique is often used to create a menu system. You click on a menu item on the left side of the screen, and only the right side of the screen re-loads. The menu stays in place.

HTML Examples

Let's take a look at a few examples. To execute the examples, simply create a text document on your desktop called 'test.html'. If you are using a Notepad program, please make sure the extension on the file is .html, not 'test.html.txt'. To do this, use 'Save As' in Notepad and then include in a double-quote the name of the file 'test.html'. On your desktop, you will see an icon with 'test' as the name, and the picture on the icon will have a web browser association.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account