Detailed explanation of basic concepts of HTML

Detailed explanation of basic concepts of HTML

What is HTML?

HTML is a language used to describe web pages.

•HTML stands for Hyper Text Markup Language
•HTML is not a programming language, but a markup language
•A markup language is a set of markup tags
•HTML uses markup tags to describe 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 start tag and the second tag is the end tag
• Start and end tags are also called opening and closing tags

HTML Elements

An HTML element refers to all the code from the start tag to the end tag.

Start tag Element Content End Tag
<p> This is a paragraph </p>
<a href="default.htm" > This is a link </a>
<br />

Note: The start tag is often called the opening tag, and the end tag is often called the closing tag.

HTML Element Syntax

•HTML elements start with a start tag
•HTML elements are terminated by a closing tag
• The content of an element is the content between the start tag and the end tag
• Some HTML elements have empty content
• Empty elements are closed by the start tag (end with the end of the start tag)
• Most HTML elements can have attributes

HTML attributes

HTML tags can have attributes. Attributes provide additional information about HTML elements.

Attributes always appear as name/value pairs, for example: name="value".

Attributes are always specified within the opening tag of an HTML element.

Property Example 1:

<h1> Defines the start of a heading.

<h1 align="center"> has additional information about alignment.

TIY: Center the title

Property Example 2:

<body> defines the body of the HTML document.

<body bgcolor="yellow"> has additional information about the background color.

TIY : Background color

Property Example 3:

<table> defines an HTML table. (You will learn more about HTML tables in a later chapter)
<table border="1"> has additional information about the table border.

HTML document = web page

• HTML documents describe web pages
•HTML documents contain HTML tags and plain text
•HTML documents are also called web pages

The role of a web browser is to read HTML documents and display them in the form of web pages. Browsers do not display HTML tags; instead, they use the tags to interpret the content of the page.

<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>

</html>

Example explanation

• The text between <html> and </html> describes the web page
• The text between <body> and </body> is the visible content of the page
• The text between <h1> and </h1> is displayed as a title
•Text between <p> and </p> is displayed as a paragraph

•When you save an HTML file, you can use either the .htm or .html file extension. We use .htm in our examples. This is just a habit that has been formed over a long period of time, because many software in the past only allowed three-letter file suffixes. However, for new software, there is absolutely no problem using .html.

The above detailed explanation of the basic concepts of HTML is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

Original URL: http://www.cnblogs.com/sxtywjx/p/5665033.html

<<:  A simple way to clear the CSS, JavaScript and background image cache in the browser

>>:  Detailed steps to build an independent mail server on Centos7.9

Recommend

Detailed process of upgrading glibc dynamic library in centos 6.9

glibc is the libc library released by gnu, that i...

JavaScript ECharts Usage Explanation

I used ECharts when doing a project before. Today...

Solution to Ubuntu 20.04 Firefox cannot play videos (missing flash plug-in)

1. Flash plug-in package download address: https:...

In-depth understanding of the use of r2dbc in MySQL

Introduction MySQL should be a very common databa...

How to query whether the mysql table is locked

Specific method: (Recommended tutorial: MySQL dat...

MySQL common statements for viewing transactions and locks

Some common statements for viewing transactions a...

How to use the Linux md5sum command

01. Command Overview md5sum - Calculate and verif...

Detailed explanation of the correct way to install opencv on ubuntu

This article describes how to install opencv with...

Analysis of the process of deploying pure HTML files in Tomcat and WebLogic

1. First, the pure HTML file must have an entry i...

Introduction to the process of installing MySQL 8.0 in Linux environment

Table of contents Preface 1. Linux changes the yu...

Detailed explanation of MySQL binlog usage

binlog is a binary log file that records all DML ...

Eclipse configures Tomcat and Tomcat has invalid port solution

Table of contents 1. Eclipse configures Tomcat 2....

Install mysql 5.6 from yum source in centos7.4 system

System environment: centos7.4 1. Check whether th...