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

What is the concept of HTML file

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the concept of HTML file". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the concept of HTML file".

1. What is a HTML file?

The full name of TML is Hypertext   Marked   Language in English and Hypertext markup language in Chinese.

Different from ordinary text, an HTML file contains not only text content, but also some Tag, called "tags" in Chinese.

The suffix name of an HTML file is .htm or .html.

You can write HTML files with a text editor.

two。 Write a HTML file

The full name of TML is Hypertext   Marked   Language in English and Hypertext markup language in Chinese.

Different from ordinary text, an HTML file contains not only text content, but also some Tag, called "tags" in Chinese.

The suffix name of an HTML file is .htm or .html.

You can write HTML files with a text editor.

This is my first homepage.This text is bold

To browse the first.html file, double-click it. Or open a browser, select Open from the File menu, and then select this file.

The first Tag of this file is that the Tag tells your browser that this is the header of the HTML file. The last Tag of the file is, indicating that the HTML file ends here.

The content between and is Head information. Head information is not displayed and you can't see it in the browser. But that doesn't mean the information is useless. For example, you can add some keywords to your Head message to help search engines find your web page.

The content between and is the title of this file. You can see this title in the title bar at the top of the browser.

The information between and is the text.

The text between and is expressed in bold. As the name implies, it means bold.

The HTML file looks similar to normal text, but it has more Tag than regular text, such as, etc., with these Tag, you can tell the browser how to display the file.

HTML element (HTML   Elements)  

The HTML element (HTML   Element) is used to mark the text and represent the content of the text. For example, body,   p and   title are HTML elements.

The HTML element is represented by Tag and ends with Tag.

Tag usually occurs in pairs, such as. The beginning is called Opening   Tag, and the end is called Closing   Tag.

Currently, HTML's Tag is not case-sensitive. For example, it's actually the same as.

Attributes of the HTML element (HTML   Elements)

HTML elements can have attributes. Attributes can extend the capabilities of HTML elements.

For example, you can use a bgcolor property to make the background color of the page red, like this:

For example, you can use the border property to make a table a borderless table. As follows:

Attributes usually appear in pairs of property names and values, like this: name= "value". The bgcolor in the above example,   border is name,red and 0 is value. Attribute values are generally marked in double quotation marks. The   attribute is usually the Opening   Tag attached to the HTML, not the Closing   Tag.

Body title  

This example shows you how to define the body title in the HTML file.  

HTML uses these Tag to define the body title, from large to small. Each text title has its own paragraph.  

This is a headingThis is a heading

Paragraph division

Used in HTML

And

Divide the paragraphs.

This is a paragraph

This is another paragraph

New line

By using the

This Tag can be wrapped without creating a new paragraph.

There is no Closing   Tag. For  

Line breaking is a bad habit, and the right thing to do is to use

.

This

Is a para

Graph with line breaks

HTML comment

In the HTML file, you can write code comments and explain your code, which will help you and others better understand your code in the future.

Comments can be written in between. Browsers ignore comments, and you won't see your comments in the HTML body.  

Some suggestions.

The HTML file automatically truncates extra spaces. No matter how many spaces you add, it is regarded as a space. A blank line is also regarded as a space.

Some Tag can separate text into paragraphs without using the

To segment. Such as the title Tag.

Thank you for your reading, these are the contents of "what is the concept of HTML file". After the study of this article, I believe you have a deeper understanding of what the concept of HTML file is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report