Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the HTML element

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "how to use the HTML element", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to use the HTML element" article.

HTML instance

Rookie course (runoob.com) my first title

My first paragraph.

Case analysis

DOCTYPE declares the document type

Located on the tag with a description of the document type

Located on the tag and for the visualization of web content

Located on the label and used as a title

Located on the label

Vs.

Display as a paragraph

Document types are also described in HTML5.

What is HTML?

HTML is a language used to describe web pages.

HTML refers to the hypertext markup language: HyperText Markup Language

HTML is not a programming language, but a markup language

Markup language is a set of markup tags (markup tag)

HTML uses tag tags to describe web pages

The HTML document contains HTML tags and text content

HTML documents are also called web pages

HTML tag

HTML tag tags are often referred to as HTML tags (HTML tag).

HTML tags are keywords surrounded by angle brackets, such as

HTML tags usually appear in pairs, such as and

The first tag in the tag pair is the opening tag, and the second tag is the closing tag.

Start and end tags are also known as open and closed tags

Content

HTML element

"HTML tag" and "HTML element" usually describe the same meaning.

Strictly speaking, however, a HTML element contains the opening and closing tags, as shown in the following example:

HTML element:

This is a paragraph.

Web browser

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

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

HTML web page structure

Here is a visual HTML page structure:

Page title

This is a title.

This is a paragraph.

This is another paragraph.

Only the area (the white part) is displayed in the browser.

HTML version

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

Version release time HTML1991HTML+1993HTML 2.01995HTML 3.21997HTML 4.011999XHTML 1.02000HTML52012XHTML52013

Statement

The declaration helps to display the web page correctly in the browser.

There are many different files on the web, and if you can correctly declare the version of HTML, the browser will be able to display the content of the page correctly.

Doctype declarations are case-insensitive and can be done in the following ways:

General declaration

HTML5

HTML 4.01

XHTML 1.0

Chinese coding

At present, in most browsers, Chinese garbled will occur in the direct output of Chinese, so we need to declare the character as UTF-8 in the header.

HTML instance

Page title my first title

My first paragraph.

The above is about the content of this article on "how to use HTML elements". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report