HTML from scratch (2), 2016 from scratch

Source: Internet
Author: User

HTML from scratch (2), 2016 from scratch
1. Layout

① Use the HTML layout of <div> elements. <div> elements are commonly used as layout tools because they can be easily located through CSS.

<! DOCTYPE html> 

② Use HTML5 website layout

The new semantic elements provided by HTML5 define different parts of a webpage:

HTML5 semantic elements:

Header Define the header of a document or Section
Nav Container that defines the navigation link
Section Define sections in the document
Article Define independent self-contained articles
Aside Define content other than content (for example, sidebar)
Footer Define the footer of a document or Section
Details Define additional details
Summary Define the title of the details Element

 

 

<!DOCTYPE html>

③ Use the HTML layout of the table. <Table> elements are not designed as layout tools. <table> elements are used to display table-based data and use <table> elements to achieve layout effect, because the style of table elements can be set through CSS

 

Review table: the following code defines a table with one row and one column. <th> it is the header of this row and <td> it is the content of this row, <tr> This line is defined.

 

<!DOCTYPE html>

 

 

2. HTML responsive Web Design
  • RWD refers to the Responsive Web Design)
  • RWD can transfer web pages in a variable size
  • RWD is required for tablets and mobile devices

① One way to create a responsive design is to create it by yourself:

<!DOCTYPE html>

 

 

② Using Bootstrap, another method for creating responsive design is to use a ready-made CSS framework. Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive web. Bootstrap helps you develop a site that looks superior in any size: Display, laptop, tablet, or mobile phone:

<!DOCTYPE html>

 

★Continue to learn about bootstrap later.

 

Related Article

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.