Lesson 2 Building your first web page: Part 2

Tag Diagram

You may have noticed that HTML tags come in pairs;

HTML has both an opening tag (<tag name>) and a closing tag (</tag name>).

The only difference between the opening and closing tags is that the closing tag contains an extra forward slash.

Some EXAMPLE HTML tags that might make things clearer: 

<b>Makes text bold</b>
<i>Makes text italic</i>
<h1>Tells the browser that this text is very important -the browser usually
makes this text really big</h1>
<table>Creates an HTML table - think of a spreadsheet</table>

I hope you can see the pattern in the list above.

HTML tags are not just for placing and formatting text, HTML tags can be used to include other things like: animation, video, Flash, audio, and even multimedia programs.

Comparing HTML code and the web page it creates

Let’s start with a very simple web page to make it as easy for you to understand. First lets look at the final page: sample web page

Now that we’ve seen what the page looks like, let’s look at the HTML code used to create the page.

What you should do now is take a little time and compare the HTML page and the page with the code that is used to create the page.

Notice where the tags are and what they are doing.

Some Theory: The structure of an HTML page

An HTML page is divided into two major sections:

1. The head
The head (<head>) section contains underlying information about the page which does not get displayed in the web page (except for the title of the page). It does, however, have an affect on how the web page is displayed.
2. The body
The body (<body>) section: this section contains all the stuff that appears on the actual web page when someone happens to come along with their web browser. We are talking about the actual text, images, flash movies, and so on that people will see. That, of course, means the tags used to format all this stuff are there too…

You will notice that both the head and the body sections of a web site are marked in the HTML page with their respective tags: (<head> </head>) and (<body> </body>).

If the body tag creates the body of an HTML page, and the head tag creates the head of an HTML page, how do you create an HTML page itself? You guessed it, use the HTML tags:

<html></html>

The ‘mother of all tags’ is the HTML (<html>) tag, and like all tags it must have a start tag (<html>) and an end tag (</html>).

The difference between the start and end tags is the forward slash (/), but you already knew that.

Every web page MUST begin and end with the HTML tag, otherwise the web browser (programs like Internet Explorer) will not be able to display the page.

You also have to have the head tags and the body tags. All the other tags are optional.

So the bare-bones HTML page must have these tags and in this order:

<html>
    <head>
        <title>Title of your page</title>
    </head>
    <body>
    </body>
</html>
时间: 2024-10-05 02:30:11

Lesson 2 Building your first web page: Part 2的相关文章

Lesson 2 Building your first web page: Part 1

In this ‘hands-on’ module we will be building our first web page in no time. We just need to quickly cover a couple of points beforehand to help get our feet on the ground. The three ways you can build a web page 1. Use a pre-made template: WHAT IS A

Lesson 2 Building your first web page: Part 3

Time to build your first HTML page by hand I could go on with more theory and send half of you to sleep (trust me); instead you are now going to actually build your very first web page! One of the best ways to learn something is to actually do it, so

Building a RESTful Web Service(转)

Building a RESTful Web Service This guide walks you through the process of creating a "hello world" RESTful web service with Spring. What you’ll build You’ll build a service that will accept HTTP GET requests at: http://localhost:8080/greeting a

How a web page loads

The major web browsers load web pages in basically the same way. This process is known as parsing and is described by the HTML5 specification. A high-level understanding of this process is critical to writing web pages that load efficiently. Parsing

调试android chrome web page简明备忘

必备工具 adb tools.android chrome 先开启手机调试模式 adb forward tcp:9919 localabstract:chromedevtoolsremote 成功会提示 * daemon not running. starting it now on port 5037 * * daemon started successfully * 不成功的话用这个命令再试 adb kill-server 接着打开下面的链接,这里的9919是上面adb命令中指定的 http

LR实战之Discuz开源论坛——网页细分图结果分析(Web Page Diagnostics)

续LR实战之Discuz开源论坛项目,之前一直是创建虚拟用户脚本(Virtual User Generator)和场景(Controller),现在,终于到了LoadRunner性能测试结果分析(Analysis)这部分了. LoadRunner结果分析图表功能中最重要图表分析之一,就是网页诊断细分图,在Controller场景设计运行之前,需要在菜单栏中设置启用网页诊断功能(诊断-网页诊断-启动),如图: 网页细分图,是显示每个页面及其组件的相关下载时间和大小,主要用来评估页面内容是否影响事务

微信(WeChat web page)

插件介绍: 说到微信,相信身边的很多朋友都在使用这个软件,因为它有着很多强大的功能,包括朋友圈.摇一摇.漂流瓶.语音提示等,使之成为我们生活中很重要的部分,最初在手机上使用,后来也出现了网页版,今天为大家推荐这款网页版的微信插件. 使用说明: 将微信(WeChat web page)添加至chrome,并在应用中启动它. 功能介绍: -通讯录-朋友圈-发送文件-截图工具-桌面通知-公共账号 http://www.chrome001.com/谷歌插件大全长期为您更新.

解读Web Page Diagnostics网页细分图

http://blog.sina.com.cn/s/blog_62b8fc330100red5.html Web Page Diagnostics (以下简称WPD),这是LR Analysis中非常重要的一块,搞清楚这部分的内容会让你少走很多弯路,很多环境问题都可以通过它来定位,比如客户端,网络.通过它可以你可以比较好的来定位是环境的问题还是应用本身的问题,当然更重要的是Web页面本身的问题. Web Page Diagnostics:页面诊断图,也叫页面分解总图 “页面分解”显示某一具体事务

Atitit.web三大编程模型 Web Page Web Forms 和 MVC

Atitit.web三大编程模型 Web Page    Web Forms 和 MVC 1. 编程模型是 Web Forms 和 MVC (Model, View, Controller). 2. Web编程模型?在这里我们定义Web编程模型为如何编写代码生成html返回给最终用户的方法. 它包括两部分,一个是如何编写Web应用程序的规范,另一个则是实现这一规范的Web编程框架, 3. Web Pages 是最简单的 ASP.NET 网页开发编程模型.它提供了一种简单的方法将 HTML.CSS