search
HomeWeb Front-endHTML TutorialHTML总结_html/css_WEB-ITnose

几个知识点:  

HTML 指的是超文本标记语言 (Hyper Text Markup Language)

HTML框架结构:

 

 

 

 

  此处为标签内容

 

 

HTML属性:

class=“XXX”  :元素类名,CSS定位用

id=“XXX”  :元素id,CSS定位用

style=“XXX”:定于元素颜色、是否居中、粗细、边界等

title=“XXX”:鼠标悬停时提示信息

Alt=“XXX”:图片加载错误提示信息

HTML常用标签:

文字内容

:标题居中显示

:图片显示标签

 

一些独立标签:


:换行


:创建水平线

:注释

 显示空格(一种HTML实体符号)

 

此处可嵌套其他标签
:块级元素,他的内容会另起一行开始。

此处可嵌套其他标签:内联元素,不换行

 

无序列表:

  • 第一项
  • 第二项
 

 

有序列表:

  1. 第一项
  2. 第二项

 

表格:

  

 

 

 

 

 

 

 

 

 

 

跨行 row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

 

运行样式如下:

 

表格的一些属性:

 

表单:

表单是一个包含表单元素的区域,表单元素是允许用户在表单中(比如:文本域、下拉列表、单选框、复选框等等)输入信息的元素

表单元素
:表单标签

:文本域,可输入文字

:输入框元素

:单选按钮元素

:复选按钮

:按钮

:提交按钮

 

HTML一些高级特性:

  

  

  框架,将屏幕分为两半,分别填充两个页面

:内联框架,将一个页面内联

 

:外部文件引入,放在head标签内

:定义文档的标题,位于head内

:定义关键字、文档描述,位于文档head之内

:定义整篇文档的默认链接指向

<script></script>:插入script语句

 

HTML完整例子如下:

<html><head>	<link rel="stylesheet" type="text/css" href="theme.css" />	<meta name="description" content="Free Web tutorials on HTML, CSS, XML" />	<meta name="keywords" content="HTML, CSS, XML" />	<base href="https://www.baidu.com/" />	<base target="_blank" /></head>	<body>	<h1 id="标题">标题1</h1>	<p style="font-size:10px" >黄色段落</p>	<a href="https://www.baidu.com/" title="这是链接">百度</a>	<img src="/static/imghwm/default1.png"  data-src="./picture.jpg"  class="lazy" alt="图片加载错误"/>		 <div class="news">	  <h2 id="News-headline">News headline 1</h2>	  <p>some text. some text. some text...</p>	  ...	 </div>	<span>提示:</span>		<table border="1">	<tr>	<td rowspan="2">跨行</td>	<td>row 1, cell 1</td>	<td>row 1, cell 2</td>	</tr>	<tr>	<td>row 2, cell 1</td>	<td>row 2, cell 2</td>	</tr>	</table>		<ul>	<li>第一项</li>	<li>第二项</li>	</ul>	<ol>	<li>第一项</li>	<li>第二项</li>	</ol>		<form name="input" action="html_form_action.asp" method="get">		<textarea rows="10" cols="5">文本域</textarea>		姓名:<input type="text" name="firstname"/>		<input type="radio" name="sex"/>男性		<input type="checkbox" name="car" />我有汽车		<button type="button">Click Me!</button>				<select name="cars">		<option value="volvo">Volvo</option>		<option value="saab">Saab</option>		<option value="fiat" selected="selected">Fiat</option>		<option value="audi">Audi</option>		</select>		<input type="submit" value="Submit" />	</form>		<frameset cols="75%,25%">   <frame src="./frame_a.htm">   <frame src="./frame_b.htm">	</frameset>		<iframe src="https://www.baidu.com/"></iframe>	</body></html>

  

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

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

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

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

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.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor