Introduction to HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IT Resource(it-res.com)</title>
</head>
<body>
 
<h1>My first title.</h1>
 
<p>My first paragraph.</p>
 
</body>
</html>

Example analysis

  • <!DOCTYPE html> declares it as an HTML5 document
  • The <html> element is the root element of an HTML page.
  • The <head> element contains the document’s meta data, such as <meta charset=”utf-8″> which defines the web page encoding format as utf-8 .
  • 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

What is HTML?

HTML is a language used to describe web pages.

  • HTML stands for Hypertext Markup Language
  • HTML is not a programming language, it is a markup language
  • A markup language is a set of markup tags .
  • HTML uses markup tags to describe web pages
  • HTML documents contain HTML tags and text content
  • HTML documents are also called web pages

HTML Tags

HTML markup tags are often referred to as HTML tags.

  • HTML tags are keywords enclosed in angle brackets , such as <html>
  • HTML tags usually appear in pairs , such as <b> and </b>
  • The first tag in a tag pair is the opening tag and the second tag is the closing tag.
  • Start and end tags are also called opening and closing tags.
<tag>content</tag>

HTML Elements

“HTML tags” and “HTML elements” are often used to describe the same thing.

But strictly speaking, an HTML element consists of a start tag and an end tag, as shown in the following example:

HTML elements:

<p> This is a paragraph. </p>

Web browser

Web browsers (such as Google Chrome, Internet Explorer, Firefox, Safari) are used to read HTML files and display them as web pages.

Browsers do not display HTML tags directly, but can use tags to decide how to present the content of an HTML page to the user:

HTML page structure

The following is a visual HTML page structure:

Only the <body> area (the white part) will be displayed in the browser.

HTML version

Since the early days of the web, there have been many versions of HTML:

VersionRelease
HTML1991
HTML+1993
HTML 2.01995
HTML 3.21997
HTML 4.011999
XHTML 1.02000
HTML52012
XHTML52013

<!DOCTYPE> Declaration

The <!DOCTYPE> declaration helps the web page to display correctly in the browser.

There are many different files on the Internet. If the HTML version can be declared correctly, the browser can display the web page content correctly.

The doctype declaration is case-insensitive and can be written in the following ways:

<!DOCTYPE html>

<!DOCTYPE HTML>

<!doctype html>

<!Doctype Html>

General Statement

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">

本站所有资源收集整理于网络,本站不参与制作,用于互联网爱好者学习和研究,如不慎侵犯了您的权利,请及时联系站长处理删除。敬请谅解!
IT Resource Hub » Introduction to HTML

Leave a Reply

Provide the best collection of resources

View Now Learn More