Chapter One: Building blocks of web pages

Source: Internet
Author: User
Tags basic html page

1. A Web page consists of the following three sections:

Text content, references to other files, tags

2. Basic HTML page

• Top and head of Web pages:

Top: <! DOCTYPE html>

Head:

<mate charset= "Utf-8" >

<title></title>

• The main body of the Web page:

<body></body>

3. The composition of the label: element, attribute, value

Where: is the element, SRC is the attribute, = the back "blueflax.jpg" is the SRC value.

Different attribute-value pairs are separated by a space.

4. Parent and child elements

The following code:

<article>

The ephemeral Blue Flax

src= "blueflax.jmg"/>

<p> ... continually <em> amazed </em> ... delicate <a...> Blue Flax</a> ... </p>

</article>

The structure is as follows:

<article>-------------------Parent Element

<em> <a>--------<p> Sub-elements

Among them:

5. Name the files and folders in lowercase letters, do not use spaces to separate words in file names and folder names, and you should use dashes.

6. Absolute path and relative path:

An absolute path contains a pointer to a directory or complete information, including the schema, host name, and path. A relative path refers to the path of the file relative to the provided information.

7.rel= "external": Tell the search engine that this link comes from an external reference.

Rel= "nofollow": Tell the search engine not to count this link in the weight.

Rel= "External nofollow": Tell the search engine that this link is an external link and does not count as weight.

The title property effect of the A element is that when the user mouse hovers over the link, the contents of the Title property are displayed. Added the semantics of the A element.

8. Why is semantics important:

Improve accessibility and interoperability.

Improve the Search engine optimization (SEO) effect.

makes it easier to maintain code and add styles.

Make the page load faster by making the code less.

Chapter One: Building blocks of web pages

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.