HTML entry and basics-tag 1, entry 1
I. Tag Overview
1. HTML (abbreviated as Hyper Text Markup Language) is translated into "hypertext tag Language". HTML tags are used to describe Text, images, sounds, and other content on webpages.
2. labels are divided into nested and parallel relationships.
Nested relationship:
Parallel Relationship:
Ii. Basic tags
1.html Tag: serves as the root node of all tags in the entire html.
2. head tags: used to store tags such as title, meta, base, style, link, and script.
2. title Tag: place it in the head to give the page a title of its own.
4. body Tag: the body part of the page, used to store all tags on the page.
For example:
<!DOCTYPE html>
Iii. Common labels
1. Title Tag: HTML provides 6 levels of titles.
<H1>
The h1 font is the largest and gradually decreases. Title tags help us make the page more semantic.
2. Paragraph Tag: <p> </p>, used to store text paragraphs. By default, a line break is automatically generated based on the size of the browser window.
Note: block-level elements cannot be placed in the p tag.
3. Horizontal line label:
4. line feed label: <br/>. By default, the line feed is displayed when it cannot be displayed from left to right. Use the <br> label to implement forced line feed.
5. Text format tags:
<B> </B> <strong> </strong>: bold: strong is recommended.
<I> </I> and <em> </em>: italic: em is recommended.
<S> </s> and <del> </del>: strikethrough: del is recommended.
<U> </u> and <ins> </ins>: underline: ins is recommended.
6. Image Tag: : used to display images on the page. The src attribute is required. Specifies the image path.
7. link tag: <a href = "URL"> </a>: a hyperlink tag used to implement the hyperlink function. Mutual jump between pages.
Note: You can not only create text hyperlinks, but also add hyperlinks to various webpage elements, such as, tables, audios, and videos.
8. Special Character tags: because many characters have special meanings, We can't directly write them, so we need to rely on some special tags.
For details, see:
9. Comment Tag: <! -- Comment content --> is not displayed in the browser window, but is part of the HTML document.