I am small and live in Wuhan, do two years of new media, ready to use 6 months time to switch to the front end of the industry.
Lesson Objective for today
Yesterday understood HTML, today is ready to learn about the specific structure of HTML yesterday, is suitable for learning a day, come on, small and !!!!
HTML Tag learning
HTML tag Tags are often referred to as HTML tags (HTML tags).
HTML tags are keywords surrounded by Angle brackets, such as <p>
The < TAB >Copy the code
Can you tag anything with Angle brackets and keywords?
< small and > is also an HTML tag ~~~~~Copy the code
HTML tags usually come in pairs, such as and
Pairs make me think of chopsticks, chopsticks can be used in pairs, it seems that HTML tags are also at the beginning and end, can be used, this year everything has pairs, terrible.
The first tag in a tag pair is the start tag and the second tag is the end tag
The first tag and the second tag, which makes me feel like there could be a third tag.
Start and end tags are also known as open and close tags
Wonder why there are two labels?
HTML Element learning
The HTML element contains the opening HTML tag, element content, and closing HTML tag.
< tag > Content </ tag >Copy the code
<p> This is a paragraph. </p>
But as the tutorial notes, “HTML tag “and “HTML element” usually mean the same thing. (Wondering why it means the same thing again) I’m starting to get a little confused
Web Browser Understanding
Web browsers (such as Google Chrome, Internet Explorer, Firefox, Safari) are used to read HTML files and display them as Web pages. Browsers don’t display HTML tags directly, but they use tags to decide how to present the content of an HTML page to the user! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2020/4/9/1715f1dbbe27e8af~tplv-t2oaga2asx-image.image)
HTML structure learning
It was edited yesterday
<html>
<head>
<meta charset="utf-8">
<title>Rookie tutorial (runoob.com)</title>
</head>
<body>
<h1>I'm small and</h1>
<p>Hello, everyone</p>
</body>
</html>
Copy the code
- Declare it as an HTML5 document
- The < HTML > element is the root element of an HTML page
- The element contains meta data for the document, such as defining the web page encoding as UTF-8.
- The
element describes the title of the document - The element contains the visible page content
- The
element defines a header
- The
element defines a paragraph
<! DOCTYPE>
The statement
declaration helps render the page correctly in the browser. There are many different files on the web, and if you can declare the HTML version correctly, the browser will display the web content correctly. The DOCType declaration is case insensitive and is used to tell the Web browser which HTML version of the page is used.
<! DOCTYPE html> <! DOCTYPE HTML> <! doctype html> <! Doctype Html>Copy the code
General statement
- HTML5
- HTML 4.01
- XHTML 1.0
In HTML 4.01,
declaration refers to a DTD (Document type declaration) because HTML 4.01 is based on SGML (Standard Generalized Markup Language). HTML 4.01 specifies three different
declaration, respectively: Strict, Transitional, and Frameset. HTML5 is not based on SGML and therefore does not require a reference to A DTD.
It feels like there are so many ways to declare. Ahhhhhhh
If you declare it correctly, it will display it correctly, but what if you accidentally make a mistake? What will it show, curious
<html>
The element
Is the root element of an HTML page.
Not sure what a root element means.
<head>
The element
Contains meta data for the document, e.g.
defines the web page encoding format as UTF-8.
Meta data???? What is this page encoding format??
<title>
The element
Notesthe title of the document
The title? That this and I write the title of the public number article is the same meaning?
<body>
The element
Contains visible page content
Visible content? That this should key note down!!
<h1>
The element
Define a big heading
The title? Why is there another headline?
< p > element
Define a paragraph
The paragraph? That this and I write the public number article article paragraph is the same meaning?
Learn nouns today
The name of the | Noun parsing |
---|---|
HTML tags | Keywords surrounded by Angle brackets |
The start tag | The first tag in a tag pair is the start tag |
End tag | The second tag in a tag pair is the closing tag |
The Web browser | Web browsers (such as Google Chrome, Internet Explorer, Firefox, Safari) are used to read HTML files and display them as Web pages. |
<html> The element |
The root element of an HTML page |
<head> The element |
Contains meta data for the document, such as<meta charset="utf-8"> Define the web page encoding format asutf-8. |
<title> The element |
Notesthe title of the document |
<body> The element |
Contains visible page content |
<h1> The element |
Define a big heading |
<p> The element |
Define a paragraph |
DTD | Document Type declaration |
SGML | Standard Generalized Markup Language |
Try today
Why does my little TAB look weird?
Summary of today’s lesson
Today the mood
Today I learned a lot of new nouns, some of them make me confused, I hope to learn more things tomorrow ~~~
This article is formatted using MDNICE