HTML frames and layouts

Source: Internet
Author: User
Tags set background

Original: http://www.cnblogs.com/yyhh/p/4210659.html

HTML block

HTML block elements

When a block element is displayed, it usually starts with a new line

such as:

<! DOCTYPE html>

HTML inline elements

Inline elements typically do not start with a new line, usually in a row

such as:<b>, <a>,

<! DOCTYPE html>

HTML <div> Elements

The <div> element is also called the Block element, which is mainly composed of the container of HTML elements, in fact <div> this element, will be a lot of elements frame up, and then use CSS to change the <DIV>, you can change the whole bunch of elements together, Save the programmer a lot of time. If you don't have a <div> tag, you have to define a style, a boring job, and a very inefficient one.

<! DOCTYPE html>

HTML <span> Elements

The <span> element is an inline element that can be used as a container for text, and only the text in the <span> tag will be modified by the CSS style

<! DOCTYPE html>

HTML Layout

<div> layout

Know that <div> is defined as a block, then you can use <div> to page layout. You can define <div> as head, left menu, middle body, bottom tab. Is it cool to modify the contents of the <div> of the defined IDs?

<!         DOCTYPE html>

HTML framework

The framework is to call other HTML on the home page to define its location so that it can be reused, just like the class in Java. can call each other. 3 non-colored HTML can be built first

<!--frame1.html--><! DOCTYPE html>
<!--frame2.html--><! DOCTYPE html>
<!--frame3.html--><! DOCTYPE html>

Framework Frame:

The framework has a great effect on the design of the page.

Frame set label <frameset>:

Frameset tags define how to split a window into a frame

Each frameset defines a number of column rows or columns

The value of Rows/cols specifies the area of the screen that each row or not occupies.

COLS: Column

Rows: Rows

(Note: Frameset to be written in head)

<! DOCTYPE html>

Inline frame:

Iframe

An IFRAME can set a framework to nest a frame.

<!--frame_index.html--><!--Main Page--><! DOCTYPE html>
<!--frame1.html--><! DOCTYPE html>
<!--frame2.html--><! DOCTYPE html>
<!--frame3.html--><! DOCTYPE html>

HTML frames and layouts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.