4
头图

【HTML】Do you still read HTML? Take you to relive or walk in

classic answer

Interviewer: Do you know HTML?

Answer: Ah, I'm here to interview the front-end, I know Vue!

Interviewer: ? ? ?

introduction

github : [HTML] Do you still read HTML? Take you to relive or walk in

Content Express: What you can learn after reading this article!

HTML内容速递

1. Thinking about writing

While writing this article, I pondered a few questions. But in the end, I made up my mind to write. Writing is for technology, but the process of technology transmission is not limited to technology.

1.1. Questions to think about

  • There are so many HTML articles, why write them?
  • Who can't get started with HTML? Still learning?
  • HTML articles are basically hydrology, who will read them?

1.2. Your own answer

The birth of a knowledge point, if a standard is formed, then the center is determined. No matter how many articles, the meaning of its expression is the same, and it is the same!

Isn't the purpose of writing an article so that its readers can read it and get something out of it? So I still have to write, but express it so that you like it (this is also a continuous pursuit)!

I'm sure most people who read this article know HTML, or have heard of HTML.

But there are always some people who don't understand, there are always people who think they understand (myself!), so I turn my perspective to you! My xdm (1. Write code 2. Brothers 3. Want to be beautiful 4. Diagonally opposite 5. Brother Meng), don't get me wrong, Brother Meng (both men and women are brothers)! Really write articles from the reader's point of view!

The fact that the articles are not watery is not because there are too many similar articles, but because the similar articles are too similar, the aesthetics are fatigued, and there is no new idea.

Well, come on! Come up with my new ideas and write for you!

Similarly, take out your golden finger and praise me! (From the ghost knife - pick up your head and fight for me!)

鬼刀

2. What is HTML

Can't escape this topic. Sorry, I'll tell you again!

The full English name of HTML is Hyper Text Marked Language, which was invented in 1990 by Tim Berners-Lee, the inventor of the Web.

2.1. First say something you don't understand (or don't understand once)

  • 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 documents contain HTML tags and text content
  • HTML documents are also called web pages

2.2, for beginners (vernacular)

HTML pages are called documents, and these documents I want to make it look as handsome as me, but with shorter legs!

This is how to do? Mark its legs: can't be longer than me! Is not on the line!

Speaking of this mark, HTML smiled: isn't it my dish!

HTML displays images, sounds, pictures, text animations, video and other content through marked-up instructions.

If you're new to HTML, remember that it's a markup that decorates a document.

3. Great author

The author of HTML is Tim Berners-Lee.

He invented the world's first browser.

first server.

The www (World Wide Web) was invented.

HTML, HTTP, and URLs were invented at the same time.

Give me one of the above, and it will be hot, if not, it will burn to death!

If you don't believe it, you can look it up on Baidu Encyclopedia.

image-20220114190329587

Ever wondered who the author of HTML was before? This is what I need to put forward when I go back and summarize. When learning HTML, there should be the name of its author. I put it here to thank and pay tribute!

4. The evolution of HTML

After reading the author, how can you not understand the development history of HTML becoming perfect!

<img src="https://guizimo.oss-cn-shanghai.aliyuncs.com/img/%E6%9C%AA%E5%91%BD%E5%90%8D%E7%BB%98%E5% 9B%BE.drawio.png" alt="HTML history" style="zoom:50%;" />

  • HTML 1.0 (HTML/HTML+) Hypertext Markup Language (First Edition) - Published as an Internet Engineering Task Force (IETF) Working Draft in June 1993 (not a standard).
  • HTML 2.0 - published as RFC 1866 in November 1995, declared obsolete after RFC 2854 was published in June 2000.
  • HTML 3.2 - January 14, 1996, W3C Recommendation.
  • HTML 4.0 - December 18, 1997, W3C Recommendation.
  • HTML 4.01 (minor improvement) - December 24, 1999, W3C recommended standard, the encoding is more standardized.
  • XHTML 1.0 - Published on January 26, 2000, is a W3C Recommendation, later revised and republished on August 1, 2002.
  • XHTML 1.1 - Released on May 31, 2001, a W3C Recommendation.
  • XHTML 2.0 - Published August 5, 2002, W3C draft.
  • HTML5.0 - On December 17, 2012, the World Wide Web Consortium announced that after nearly eight years of hard work, the standard specification was finally completed.
  • HTML5.1 - May 6, 2013, draft published.

5. HTML version

After reading so much, the sharp-eyed xdm should have found it, XHTML. what is this? Speaking of which, let's pull the XML together and have a three-knot in Taoyuan!

Differences between HTML, XML, and XHTML

  • HTML : Hypertext markup language, which is a looser and less strict Web language;
  • XML : an extensible markup language, mainly used to store data and structures, extensible;
  • XHTML : Extensible Hypertext Markup Language, based on XML , similar to HTML but with stricter syntax.

It follows that XHTML is syntactically strict HTML.

6. What does an HTML look like?

After talking so much, I didn't talk about HTML! To the point!

6.1. The case of HTML

First look at a picture

HTML网页结构 This is the content of an HTML document, translated with code

 <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>我是一个标题</title>
</head>
<body>
    <h1>我是一个页面内容的标题</h1>
    <div>我是一个美男子,你信吗?</div>
</body>
</html>

Look at the pictures, look at the code, but don't look at the performance?

演示效果

After reading it, did you find that HTML is a set of sets, which is very suitable for patients with obsessive-compulsive disorder! So start with the first line first!

6.2, DOCTYPE statement

All HTML documents must start with the <!DOCTYPE> declaration. It is also case insensitive.

Let's take a look at some commonly used HTML versions of common declarations.

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

If someone is arrogant, why is it the commonly used HTML version! Well, you've hit the jackpot!

Commonly used HTML version, a treasure website! address

It can be seen that the development of HTML5 is still quite good!

image-20220114231005974

So now our document declaration is generally using HTML5 <!DOCTYPE html> .

6.3. HTML tags

In the above code example there are a lot of tags, aka markers. Tags such as html, meta, head, title, body, h1, div, etc.!

Novice speech: I can't remember!

I can't remember either! Write more, remember! So don't worry, I won't expand on HTML tags here.

You should now understand what they are used for, right?

6.4, HTML character set

I saw a code charset="UTF-8" , what does it mean? It tells the browser what encoding should be used to parse your HTML.

At present, in most browsers, Chinese garbled characters will appear when outputting Chinese directly. At this time, we need to declare the characters as UTF-8 or GBK in the header.

Specifically why are these two, or next time!

Of course, most of today's versions use HTML5, and the default character set in HTML5 is UTF-8. Is there one less worry?

7. Summary

This article is the first one, and it is also an article transformation that overturned my previous HTML notes. I wrote this blog myself, and after reading more than 30 blogs, I feel that this one is enough!

Refactoring the front-end knowledge system, do you want to work together?

Blog Description and Acknowledgments

Part of the information involved in the article comes from the Internet, which contains my own personal summary and opinions. The purpose of sharing is to build a community and consolidate myself.

If the cited information is infringing, please contact me to delete it!

Thanks to the almighty network, W3C, rookie tutorial, etc.!

Thank you for your hard work, personal blog , GitHub learning , GitHub

The public account [Gui Zimo] , the small program [Zimo said]

If you feel that it is helpful to you, please give me a thumbs up and encouragement, and remember to collect the good text! Follow me to grow together!

Luckily I'm here, thank you for coming!


归子莫
1k 声望1.2k 粉丝

信息安全工程师,现职前端工程师的全栈开发,三年全栈经验。