What is HTML? HTML INDRODUCTION
What is HTML?
HTML is the standard markup language used to describe web pages.
- HTML stands for Hyper Text Markup Language.
- HTML is not a programming language, but a markup language.
- Markup language is just a markup tag.
- HTML uses markup tags to describe web pages.
- HTML documents are also called web pages.
What are the features of HTML?
- Simplicity: HyperText Markup Language version upgrade using superset mode, which is more flexible and convenient.
- Scalability: The widespread use of Hypertext Markup Language has led to the need to enhance functionality and add identifiers, and Hypertext Markup Language takes a subclass of elements to ensure system expansion.
- Platform Independence: While personal computers are gaining popularity, there are many other users using MACs and other machines. Hypertext Markup Language can be used on a wide range of platforms and this is another reason why the World Wide Web (WWW) is prevalent.
- Versatility: HTML is a web-oriented common language. It allows developers to create complex pages of text and images that can be viewed by anyone else on the web, regardless of the type of computer or browser they are using.
HTML Example
Here’s a piece of runnable HTML code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TutorialDocs(tutorialdocs.com)</title>
</head>
<body>
<h1>Hello,My First Heading.</h1>
<p>Hello,My Fist Paragraph.</p>
<a href="http://www.tutorialdocs.com/" target="_blank">Hello,My First Link.</a>
</body>
</html>
The <! DOCTYPE html> is declared as an HTML5 document.
The <html> element is the root element of the HTML page.
The <head> element contains the document’s metadata (including elements such as meta, title, style, script).
The <title> element describes the title of the document.
The <body> element contains the visible page content.
The <h1> element defines a large heading.
The <p> element defines a paragraph.
HTML Tags
- HTML tags are the most basic unit in HTML and the most important part of HTML.
- HTML tags are keywords surrounded by angle brackets, such as <body>.
- HTML tags usually appear in pairs, such as <a> and </a>.
- The first tag in a pair is the start tag and the second tag is the end tag.
- HTML tags are case-insensitive, for example <body> has the same syntax as <BODY>, but lowercase is recommended.
The content of the webpage needs to be displayed in the <html> tag. The headings, character formats, languages, compatibilities, keywords and descriptions need to be displayed in the <head> tag.The real content of the page needs to be displayed in the <body> tag.
Web Browser
Web browsers are used to read HTML document and parse the HTML document structure to display the results on the screen.The most popular Web browsers are Chrome, Internet Explorer, Firefox, Safari and more.
HTML Version
With the continuous update of network equipment and the ever-increasing variety of network applications, the HTML version has also undergone great changes:
Version | Release time |
---|---|
HTML | 1991 |
HTML + | 1993 |
HTML 2.0 | 1995 |
HTML 3.2 | 1997 |
HTML 4.01 | 1999 |
XHTML 1.0 | 2000 |
HTML5 | 2012 |
XHTML5 | 2013 |
The <!DOCTYPE> Declaration
<! DOCTYPE> declaration helps to display the page correctly in the browser.
There are many different files on the web, and if the correct version of the HTML is declared, the browser can display the content of the web page correctly.
doctype declaration is not case-sensitive, the following ways are correct:
<!DOCTYPE html>
<!DOCTYPE HTML>
<!doctype html>
<!Doctype Html>
General Declaration
HTML5
<!DOCTYPE html>
HTML 4.01
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
XHTML 1.0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">