Getting Started with HTML basics

Source: Internet
Author: User
Tags blank page

Hello everyone, yesterday we briefly introduced the editor, today we need to use the editor of the actual operation.

First, we need to look at HTML. So what is HTML?

HTML: Hypertext Markup Language (hypertext Markup Language), written to the browser language, is currently the most widely used language on the web. HTML is also constantly updated, the latest version has appeared html5,html5 added more tags and features, but also abolished a lot of old elements.

We write the code in the editor or Notepad open in the browser, it is best to use some mainstream browser, such as: Google, Firefox, Apple, etc., but it is best not to use IE browser, because the low version of IE compatibility is not very good, You will lose a lot of hair because of the compatibility of IE when you go to study or work later.

HTML elements are made up of start tags and end tags, for example: "<p></p>", although now we do not know what the specific label means, but the label must be the format: there is a pair of start <> and end </>

Of course there are some special labels that are single-label, that is, only start <> but others bring their own terminator, example:

The basic structure of HTML

The above example is telling the browser The contents of the document are placed between <body></body>.
Today we'll start by understanding some of the common elements (tags) and basic specifications of HTML.


Basic specifications
1. Before writing 2. Page encoding: There are many kinds of coding, but commonly used is utf-8.utf-8 for multi-language coding (Universal code), gb2312 for Chinese Simplified encoding. For detailed coding questions, you can browse blogs. Set the page encoding statement to <meta charset= "Utf-8"/ It is defined within the At first we understand that the two-point specification is basically enough, in the future there is a need to standardize the place we elaborate.


Common Elements

The most common is the text label, for example:
<body>
<p>
May-j-wang's blog, seeking attention
</p>
</body>

Open in the browser that's the effect.

is to define a paragraph that will be used when writing articles, news, or a large amount of text.

Line breaks <br/>

Line breaks are the most normal for text editing. When the text is written on a line, you need to wrap it. Or, as needed, wrap the text, which is okay.

Title

In a Web page, the document will have headings of different sizes, with code written as follows:

The smaller the number of headings after the h is lower.

Text formatting, some of the elements used to set text fonts:

<b> define bold text </b><br/>

<i> define italic text </i><br/>

<del> define Delete text </del><br/>

<sup> define superscript character </sup><br/>

<sub> define subscript character </sub><br/>

As follows:

Hyperlinks <a></a>

A tag is used to define a hyperlink, which is the href attribute, and the function of the HREF is to indicate the URL to which the hyperlink is to be linked. In addition to the href attribute, the Title property indicates the link's prompt. The target property indicates how the link is opened, that is, when the link is clicked, Select whether to open on another page or this page. Its property values include _blank (new blank page), _self (Current page), _top (current page).

<a href= "#" target= "_blank" > Baidu </a>

The value of the href can be an external link, or it can be an internal file, such as a ***.html file.

<a href= "http://www.163.com" > External links </a>

<a href= "about.html" > Internal links </a> Examples:

Note: The text style on a label is the style of a label

Image

Property

Property value

Description

Src

wr.

The address of the picture resource

Width

Pixel (px) percent (%)

Picture width

Height

Pixel (px) percent (%)

Picture height

Alt

Alternate text

Alternate text for a picture



List

The list is divided into:<ul><li> unordered list </li></ul>,<ol><li> ordered table </li></ol> and <dl> <dd> Custom Lists <dd><dl>

<ul>
<li> Apple </li> <li> bananas </li> <li> Sydney </li> </ul>

Ordered list

A sequence table uses a numeric or alphabetic system to organize the information contained in the list. Ordered lists can use numbers (default), uppercase, lowercase, uppercase Roman numerals, and lower case Roman numerals to arrange items.

<ol>
<li> Cherry </li>
<li> Watermelon </li>
<li> Pineapple </li>

</ol>

<dl>

<dd> League of Legends </dd>

<dd> Overwatch </dd>

<dd> World of Warcraft </dd>

</dl>

The above is a basic knowledge of the basics of HTML, there are many common tags in html, and tomorrow we continue to say goodbye.

Author: May-j-wang

Getting Started with HTML basics

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.