In 2022, will you look at HTML again? Take you to revisit or walk in!
The introduction
When writing some articles, I thought about a few questions. But finally decided to write, writing is for technology, technology transfer process is not only call technology.
Question of thought
- There are so many HTML articles, why write them?
- Introduction to HTML Who wouldn’t? To learn?
- HTML articles are basically hydrology, who will read?
Own answer
The birth of a knowledge point, if formed a standard, so the center is determined. No matter how many articles, the meaning of their expression is the same, million change does not leave its zong!
Isn’t the purpose of writing an essay to make it readable and useful to its readers? So I will write, but in such a way that you will like it!
I’m sure most of you reading this article know HTML, or have heard of it.
But there are always some people who don’t understand, and there are always some people who think they do (myself! So I turned my eyes to you! My XDM (1. Write code 2. Guys 3. Think big 4. Brother meng), don’t get me wrong, brother meng (both men and women are brothers ha)! Truly to the reader’s point of view to write articles!
Article water is not water, in fact, not because of the same kind of article, but because the same kind of article is too similar, aesthetic fatigue, no new idea.
Come, then! Come up with my new idea and write for you!
Also, pull out your golden finger and praise me! (From ghost Knife — pick up your head and fight for me!)
What is HTML
I can’t get away from it. Sorry, I will tell you again!
HTML, which stands for Hyper Text Marked Language, was invented in 1990 by Tim Berners-Lee, the inventor of the Web.
First say something you don’t understand (or don’t understand at first)
- HTML is not a programming language, but a markup language
- A markup language is a set of markup tags.
- HTML uses tag tags to describe web pages
- HTML documents contain HTML tags and text content
- HTML documents are also called Web pages
For beginners (vernacular)
HTML pages are called documents, so I want them to be as handsome as me, but with shorter legs!
What can I do? Mark its legs: No longer than me! Is it ok?!
Speaking of this mark, HTML smiled: It is my dish!
HTML displays images, sounds, pictures, text animations, movies and other content through markup instructions.
If you’re new to HTML, remember that it’s a tag that decorates a document.
Great writer
The HTML was written by Tim Berners-Lee.
He invented the world’s first browser.
The first server.
Invented the World Wide Web.
HTML, HTTP, and URLS were invented at the same time.
Above give me one, hot hand, wrong, hot dead!
If you do not believe, baidu encyclopedia.
Have you ever wondered who the HTML author is before? This is what I need to mention when I come back to the summary, when learning HTML, should also have the name of its author, here to mention, is to thank and salute!
History of HTML
Read the author, that can not understand the HTML toward perfect development history!
- HTML 1.0 (HTML/HTML+) Hypertext Markup Language (first version) – released as an Internet Engineering Task Force (IETF) working draft (not a standard) in June 1993.
- HTML 2.0 – released as RFC 1866 in November 1995, was declared obsolete after RFC 2854 was released in June 2000.
- HTML 3.2 – W3C recommendation dated January 14, 1996.
- HTML 4.0 – December 18, 1997, W3C recommendation.
- HTML 4.01(Minor improvements) – December 24, 1999, W3C recommendation for more formal coding.
- XHTML 1.0 – Released On January 26, 2000 as a W3C recommendation and later reissued on August 1, 2002 with revisions.
- XHTML 1.1 – Released May 31, 2001, W3C recommendation.
- XHTML 2.0 – Released as a W3C draft on August 5, 2002.
- HTML5.0 – On December 17, 2012, the World Wide Web Consortium (W3C) announced that, after nearly 8 years of hard work, the standard specification was finally completed.
- HTML5.1 – On May 6, 2013, the draft was published.
The HTML version
Having seen so much, sharp-eyed XDM should have spotted XHTML. What is this? At this point, XML to pull over together to a peach garden three sworn enemies!
Differences between HTML, XML, and XHTML
HTML
Hypertext Markup language (HYPERtext Markup Language) is a looser and less strict syntaxWeb
Language;XML
: extensible markup language, mainly used to store data and structures, extensible;XHTML
: Extensible hypertext Markup Language, based onXML
, the role andHTML
Similar, but with more strict syntax.
It is concluded that XHTML is syntactic HTML.
What does an HTML look like
All this, but no HTML! Get down to business!
The case of HTML
Let’s start with a picture
This is the content of an HTML document, translated in code
<! DOCTYPEhtml>
<html>
<head>
<meta charset="utf-8">
<title>I'm a headline</title>
</head>
<body>
<h1>I'm the title of a page's content</h1>
<div>I am a handsome man, can you believe that?</div>
</body>
</html>
Copy the code
Look at the picture, look at the code, not look at the performance?
After looking at the HTML is not found a set of a set, very consistent with obsessive-compulsive patients! So let’s start with line one!
The statement
All HTML documents must start with
declaration start. It’s also case insensitive.
Let’s take a look at some common declarations in common HTML versions.
HTML5
<! DOCTYPEhtml>
Copy the code
HTML 4.01
<! DOCTYPEHTML PUBLIC "- / / / / W3C DTD HTML 4.01 Transitional / / EN"
"http://www.w3.org/TR/html4/loose.dtd">
Copy the code
XHTML 1.0
<! DOCTYPEhtml PUBLIC "- / / / / W3C DTD XHTML 1.0 Transitional / / EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Copy the code
If someone bar, why is the above commonly used HTML version ah! Well, you fell for it!
Commonly used HTML version, a treasure site! address
So the development of HTML5 is quite good!
So now our document declaration is generally using HTML5
.
HTML tags
In the code example above, there are many tags, or tags. Tags such as HTML, meta, head, title, body, H1, div, and more!
Novice speaker: I can’t remember!
I can’t remember either! Write many, hand remember! So don’t worry, I’m not going to expand on HTML tags.
Now you understand what they’re doing, right?
HTML character set
Charset =” utF-8 “; It tells the browser what encoding to use to parse your HTML.
At present, in most browsers, direct output Chinese will appear Chinese garbled situation, in this case, we need to declare the character utF-8 or GBK in the header.
Specific why is these two kinds, or next time certain!
Of course, today’s version mostly uses HTML5, and the default character set in HTML5 is UTF-8. Is that one less worry?
conclusion
This article is the first article, but also to overturn their previous HTML notes to an article transformation. Oneself write this blog, saw more than 30 blog, feel this one strong enough!
Refactoring the front-end knowledge body, you want to join us?
Blog notes and acknowledgments
Part of the information involved in this article comes from the Internet, which contains my own summary and views. The purpose of sharing is to build the community and consolidate myself.
If the information cited infringement, please contact me to delete!
Thanks to the almighty network, W3C, rookie tutorials, etc!
Thank you for your diligence, personal blog, GitHub learning, GitHub
Public number [to son mo], small program [son mo said]
If you feel helpful to you, might as well give me a thumbs-up to encourage, good article remember to collect yo! Pay attention to me grow together!
Column: Reconstructing the front-end knowledge system
Thank god I was here. Thank you for coming!