- 浏览: 10731 次
- 性别:
- 来自: 济南
最新评论
转载 HTML documents are defined by HTML elements. An HTML element is everything from the start tag to the end tag: * The start tag is often called the opening tag. The end tag is often called the closing tag. Tip: You will learn about attributes in the next chapter of this tutorial. Most HTML elements can be nested (can contain other HTML elements). HTML documents consist of nested HTML elements. The example above contains 3 HTML elements. The <p> element: The <p> element defines a paragraph in the HTML document. The <body> element: The <body> element defines the body of the HTML document. The <html> element: The <html> element defines the whole HTML document. Most browsers will display HTML correctly even if you forget the end tag: The example above will work in most browsers, but don't rely on it. Forgetting the end tag can produce unexpected results or errors. Note: Future version of HTML will not allow you to skip end tags. HTML elements with no content are called empty elements. Empty elements can be closed in the start tag. <br> is an empty element without a closing tag (the <br> tag defines a line break). In XHTML, XML, and future versions of HTML, all elements must be closed. Adding a slash to the start tag, like <br />, is the proper way of closing empty elements, accepted by HTML, XHTML and XML. Even if <br> works in all browsers, writing <br /> instead is more future proof. HTML tags are not case sensitive: <P> means the same as <p>. Many web sites use uppercase HTML tags. W3Schools use lowercase tags because the World Wide Web Consortium (W3C)recommends lowercase in HTML 4, and demands lowercase tags in future versions of (X)HTML.
HTML Elements
Start tag *
Element content
End tag *
<p>
This is a paragraph
</p>
<a href="default.htm" >
This is a link
</a>
<br />
HTML Element Syntax
Nested HTML Elements
HTML Document Example
<html>
<body>
<p>This is my first paragraph.</p>
</body>
</html>
HTML Example Explained
<p>This is my first paragraph.</p>
The element has a start tag <p> and an end tag </p>.
The element content is: This is my first paragraph.
<body>
<p>This is my first paragraph.</p>
</body>
The element has a start tag <body> and an end tag </body>.
The element content is another HTML element (a p element).
<html>
<body>
<p>This is my first paragraph.</p>
</body>
</html>
The element has a start tag <html> and an end tag </html>.
The element content is another HTML element (the body element).
Don't Forget the End Tag
<p>This is a paragraph
<p>This is a paragraph
Empty HTML Elements
HTML Tip: Use Lowercase Tags
发表评论
-
HTML Basic - 4 Examples
2010-07-12 22:42 777转载 Don't worry if the exam ... -
HTML - Getting Started
2010-07-12 22:38 468转载 What You Need You don't ... -
HTML introduction
2010-07-12 22:33 608转载 What is HTML? HTML ... -
inside SWT: what does Display bring to SWT
2010-07-03 23:53 688写在德国4:0领先阿根廷时... 前一篇说到OS将部分 ... -
inside SWT: start from OS
2010-07-02 23:07 1681SWT程序设计中,Display充当SWT与底层操作系统、UI ... -
eclipse 扩展点与命令等
2010-06-22 09:26 763org.eclipse.ui.***.jar 中plugin. ... -
eclispe IExportWizard
2010-06-21 20:21 1085通过使用eclipse的org.eclispe.ui.expo ... -
使用eclipse已有命令
2010-06-21 15:26 695ApplicationActionBarAdvisor中: ... -
SimpleDateFormat
2010-06-14 15:25 865d = (new SimpleDateFormat(" ... -
java多态性测试
2010-06-08 13:36 654public class HelloWorld { ... -
eclipse droplet 1
2010-06-04 20:22 707普通RCP程序的入口:org.eclipse.equinox. ... -
打印Class Path
2010-06-03 13:49 888import java.io.IOException; ...
相关推荐
HTML Elements框架 该框架旨在提供一种易于使用的与测试中的网页元素进行交互的方式。 它可以被认为是WebDriver页面对象的扩展。 借助Html Elements框架,您可以将网页元素分组为块,在其中封装交互逻辑,然后轻松...
html¶ <html></html> html:xml¶ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"></html> html:4t¶ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ...
只需单击一下即可轻松地删除所需HTML5元素! 删除HTML元素add-On允许您在任何HTML5网页中轻松删除所需的元素。 只需单击工具栏按钮即可激活加载项。 请注意,此附加加载需要“用户操作”要激活。 有效后,请使用鼠标...
HTML Elements屏幕快照使您可以从任何网页捕获全部或部分屏幕截图。 它使用一个名为html2canvas的开源JavaScript库。 为了使用该附加组件,只需单击工具栏图标以激活该附加组件。 然后,用鼠标左键选择任何所需的...
HtmlElements是.NET库,通过允许您创建更复杂和复杂的页面对象,对页面对象模型进行了补充。 它还为常用HTML元素(链接,输入字段,图像,框架等),备用等待语法,智能框架和一些其他有用的实用程序提供了一组标准...
2.2 HTML elements 2.3 Tips 2.4 Attributes 3. Titles. Headings. Paragraphs. 3.1 The title tag 3.2 Headings 3.3 Paragraphs 4. Unnumbered, Numbered, Definition and Nested Lists 4.1 Ordered lists 4.2 ...
"HTML元素参考手册 HTML Elements Reference 网页教程与代码 站长网教程中心_www_admin5_com-html.htm"则可能是一份详尽的HTML元素参考手册,包含了所有HTML元素的详细说明、用法示例和代码片段。这份手册可能帮助...
《Divelements.SilverlightTools工具:HTML容器的深度解析》 Divelements.SilverlightTools是一款专为Silverlight开发者设计的强大工具集,它极大地扩展了Silverlight的应用潜力,尤其在处理HTML容器方面表现突出。...
在 HTML 部分,书中对 HTML 的基础知识进行了详细的介绍,包括 HTML 的基本结构、HTML elements、HTML 属性、HTML 事件等。此外,书中还对 HTML5 的新特性进行了介绍,包括新的 HTML elements、新的 API 等。 在 ...
2. HTML元素(HTML Elements): HTML元素是构成网页的基本单元,它们由一对标签(Opening Tag和Closing Tag)定义,如`<p>`和`</p>`表示一个段落。元素可以有属性,比如`<body bgcolor="red">`,其中`bgcolor`是...
Book Description THE CLASSIC WEB AUTHORING GUIDE, NOW 100% UPDATED AND BETTER THAN...Contains quick reference guides to HTML elements and CSS properties–including the newest HTML5 and CSS3 improvements!
HTML 4.0的英文参考手册 初学者的参考用书
HTML文件由一系列的元素(HTML Elements)组成,这些元素通过标签(Tag)来表示,标签通常成对出现,如`<tag>`和`</tag>`,用来包裹网页内容。 HTML的基本概念包括: 1. **HTML文件**:HTML文件是一种包含文本内容...
Heads and bodies — dive head-first into HTML elements, add paragraphs (and other containers) for text, and create lists and tables Get engaged — entice your visitors with links, images, audio, video...