search
HomeWeb Front-endHTML TutorialI have nothing to do at the company, just write it down casually

HTML

What is a browser and what is a server?

  1. A browser refers to a software that can display the content of HTML files (an application of Standard Universal Markup Language) on a web server or file system and allow users to interact with these files. (Front-end) *Features:
    • Can display html files in the server.
    • Allows users to interact with these files.
  2. A server, also called a server, is a device that provides computing services. Since the server needs to respond to service requests and process them, generally speaking, the server should have the ability to undertake services and guarantee services.
    • Features:
    • Handle requests.
    • Must be guaranteed to be powered on 24 hours a day.

Request protocol: http protocol:

  1. Request message.
  2. Response message.
  3. url: (Address) The content we enter on the address bar.
    • Url composition: protocol://server’s ip address: port number/request page.

It turns out that what the browser does is to parse (render) the response returned by the server from top to bottom, and display the final page effect.

Languages ​​recognized by the browser

  1. HTML: From a semantic perspective, describe the structure of the page.
  2. css: Beautify the page from an aesthetic point of view.
  3. javascript: From an interactive perspective, improve the user's perspective.

HTML

  1. The relationship between tags and tags
    • Nested relationship
    • Parallel relationship
  2. tags

2.1 h (header) tag

<code><code class="hljs stylus"> h系列的标签(Header):<span class="hljs-tag">h1,<span class="hljs-tag">h2,<span class="hljs-tag">h3,<span class="hljs-tag">h4,<span class="hljs-tag">h5,<span class="hljs-tag">h6
 作用:把页面上的文字加上标题上的语义
 *注意:一个页面只能使用一个h1标签</span></span></span></span></span></span></code>
</code>

2.2 p (paragraph) paragraph tag

<code><code class="hljs undefined"> 作用:给页面的上一段文字加上段落的语义。
 特点:页面上的一个段落,单独占一行,并且与上下内容之间存在距离。</code>
</code>

2.3 hr tag (Horizontal Rule)

<code><code class="hljs undefined"> 作用:在页面显示一条横线(没有自己的语义)
 特点: 在页面显示一条横线,默认占整行。</code>
</code>

2.4 br tag (break)

<code><code class="hljs undefined"> 作用和特点都是换行</code>
</code>

2.5 b(Bold),u(Underlined),i(Italic),s(Strikethrough),strong,em,del,ins

<code><code class="hljs stylus"> 作用:
     b:加粗    语义:没有语义
     u: 下划线
     <span class="hljs-tag">i:  倾斜
     s: 删除线
     建议不要使用,因为这些标签没有语义。
     作用:
     <span class="hljs-tag">strong:加粗   语义:加强语气
     <span class="hljs-tag">ins:下划线
     <span class="hljs-tag">em:倾斜
     <span class="hljs-tag">del:删除线
     可以使用</span></span></span></span></span></code>
</code>

2.6 img tag (image):

<code><code class="hljs dos">       作用:在页面显示一张图片
       特点:就是显示图片。
        属性:
     src    图片显示的路径
     alt    如果图片加载不出来会显示这个属性中的文字
     <span class="hljs-built_in">title    介绍这张图片</span></code>
</code>

2.7 a tag (Anchor): Anchor

<code><code class="hljs livecodeserver"> <span class="hljs-operator">a 标签的其它名称:
    超级链接,超链接,锚链接
    作用:可以在一个页面跳转到另一个页面上
 注意:在<span class="hljs-operator">a标签之内必须要写上文字,如果没有,那么这个标签在页面上找不到。
 <span class="hljs-operator">a标签的其它用法:
 <span class="hljs-number">1.0可以不跳转(跳转到当前页面)href=”<span class="hljs-comment">#”
 <span class="hljs-number">2.0可以跳转到另外的页面。
 <span class="hljs-number">3.0可以在当前页面进行定位。
 A.设置<span class="hljs-operator">a标签的href属性为“<span class="hljs-comment">#id名”,
 B.在页面的指定位置加入一个目标标签(可以是任意标签)
 C.必须给这个标签设置一个id名:<p id="”mubiao”">这是目标</p>
  <span class="hljs-number">4.0在跳转的页面进行定位。
  <span class="hljs-number">5.0可以进行下载。(强烈不推荐使用)

    <span class="hljs-operator">a标签的属性:
  href    <span class="hljs-operator">a标签跳转的目标地址
  target    <span class="hljs-title">_blank:保留原始页面,再进行跳转
  <span class="hljs-title">_self:在当前页面进行跳转
  base    为页面上所有的<span class="hljs-operator">a标签设置跳转的方式(base标签一般放在titile标签下面)</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></code>
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML vs. CSS and JavaScript: Comparing Web TechnologiesHTML vs. CSS and JavaScript: Comparing Web TechnologiesApr 23, 2025 am 12:05 AM

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

HTML as a Markup Language: Its Function and PurposeHTML as a Markup Language: Its Function and PurposeApr 22, 2025 am 12:02 AM

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.