html入门教程(五)块、响应式web设计、内联框架

一、span与div

是块级元素,它是可用于组合其他 HTML 元素的容器。由于它属于块级元素,浏览器会在其前后显示折行。常与css一起使用设置布局。 元素是内联元素,可用作文本的容器。与css一起使用,设置文本的样式。














London

London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.

Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.

html入门教程(五)块、响应式web设计、内联框架_第1张图片<!doctype html>说明版本是html5

另外如果不用div的话,可以用下面的标签

header 定义文档或节的页眉
nav 定义导航链接的容器
section 定义文档中的节
article 定义独立的自包含文章
aside 定义内容之外的内容(比如侧栏)
footer 定义文档或节的页脚
details 定义额外的细节
summary 定义 details 元素的标题

二、HTML 响应式 Web 设计

  • RWD 指的是响应式 Web 设计(Responsive Web Design)
  • RWD 能够以可变尺寸传递网页
  • RWD 对于平板和移动设备是必需的

bootstrap是目前最流行的响应式框架,可以在手机,平板,电脑等任何尺寸的设备上用一个设计。下面是一个例子









Demo

Resize this responsive page!


London

London is the capital city of England.

It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.

Paris

Paris is the capital and most populous city of France.

Tokyo

Tokyo is the capital of Japan, the center of the Greater Tokyo Area, and the most populous metropolitan area in the world.

html入门教程(五)块、响应式web设计、内联框架_第2张图片

三、内联框架iframe

通过使用框架,你可以在同一个浏览器窗口中显示不止一个页面。每份HTML文档称为一个框架,并且每个框架都独立于其他的框架。但是开发人员必须跟踪多个页面,在框架里也很难打印整个页面。








你可能感兴趣的:(web,html)