HTML simple introduction and common elements

Source: Internet
Author: User

<!DOCTYPE HTML>    <HTML>        <Head>            <MetaCharSet= "Utf-8">            <title>Head First Lounge</title>            <style>Body{Background-color:#eaf3da;                }            </style>        </Head>    <Body>        <H1>Welcome to the New and improved Head first Lounge</H1>          <imgsrc= "Http://www.cnblogs.com/drinks.gif"alt= "Drinks">          <P>Join us any evening for refreshing
         <ahref= "http://www.cnblogs.com/elixir.html">Elixirs</a>,
Cinversation and maybe a game or both of<em>Dance Dance Revolution</em>.
Wireless access is always provided; Byows (Bring your own Web Server).
        </P>    <H2>Directions</H2>      <P>You'll find us right in the center of downtown Webville.
If you need help finding us, checkout out
Our<ahref= "http://www.cnblogs.com/directions.html">Detailed
Directions</a>.<Q>Come Join Us!</Q>
</P>      <ol>        <Li>Walla Walla, Wa</Li>        <Li>Magic City, ID</Li>        <Li>Bountiful, UT</Li>        <Li>Last Chance, Co</Li>      </ol>      <blockquote>Passing cars, when you can ' t see,
May get you,<BR/>A Glimpse,<BR/>of eternity. </blockquote>    </Body>
   </HTML>
to enter the world of the web, there is only one obstacle in front of you, that is to learn its language. HTML and CSS are the languages we use to create Web pages.

The Web server stores and provides Web pages created by HTML and CSS. The browser gets the Web page and displays the contents of the page based on HTML and CSS.

HTML is the abbreviation for Hypertext Markup Language (Hyper Text Markup Language), which is used to create the structure of a Web page.

HTML tells the browser the structure of the document: where the title is placed, where the paragraph is placed, and the text needs to be emphasized. With this information, the browser uses its built-in default style to represent the structure.

CSS is an abbreviation for cascading style sheets (cascading style Sheets) to control the performance of HTML.

Using CSS, you can describe how you want to represent your content, such as changing the font, color, size, and so on, to make it look more beautiful.

While this means learning two languages, you will find that, because each language has its own areas of expertise, it is easier to actually learn two languages to make them perform their tasks compared to the way the view uses one language.

What is HTML?

HTML is a language used to describe a Web page.

    • HTML refers to Hypertext Markup Language (Hyper Text Markup Language)
    • HTML is not a programming language, but a markup language (Markup language)
    • Markup language is a set of tag tags (markup tag)
    • HTML uses tag tags to describe web pages
HTML tags

HTML tag tags are often referred to as HTML tags (html tag).

    • HTML tags are keywords surrounded by angle brackets , such as
    • HTML tags are usually paired up , such as <b> and </b>
    • The first label in the pair is the start tag , the second is the end tag
    • Start and end tags are also known as open tags and closed labels

With HTML, we use markup to represent the structure of the content. We refer to the matching tags and what they surround as elements.

And what is the element? It usually consists of three parts: a start tag, a content, and an end tag. However, some elements (such as ) have exceptions.

The following common elements are described below:

HTML title(Heading)

is defined by tags such as

For example:

< H1 > This was a heading</H1><H2>This is a heading  </h2><h3>This is a heading</  h3>

HTML Annotations

You can insert comments into HTML code, which improves readability and makes your code easier to understand. The browser ignores comments and does not display them.

The comments are written like this:

<!-- -

HTML paragraph

is defined by the <p> tag.

For example:

< P > This is a paragraph. </ P > < P > This is another paragraph. </ P >

HTML Horizontal Line

<HR/> Tags Create horizontal lines in the HTML page.

For example:

<p>this is a paragraph </p><hr /><< Span style= "color: #800000;" >p>this is a paragraph</ p><HR /><p>this is a paragraph</p >             

The HR element can be used to delimit content.

HTML Wrapping

If you want to wrap (a new line) without creating a new paragraph, use the <BR/> Label:

For example:

< P > This are</>a para</>graph with line breaks  </p>

The <br/> element is an empty HTML element. Because the close tag doesn't make any sense, it doesn't have an end tag.

HTML Links

is defined by the <a> tag.

For example:

<href= "http://www.w3school.com.cn">This is a link</ a >

where the href attribute of the <a> element specifies the destination file for the connection.

HTML Images

is defined by the tag.

For example:

<src= "Https://c2.staticflickr.com/4/3689/10613180113_fdf7bcd316_b.jpg"  alt= "Drinks">

Where the src attribute of the element specifies the location of the image file to display on the Web page, the alt attribute needs to specify some text that describes the image.

Here, for example, Href,src,alt, is the attribute of the element, the same way, the first is the property name, followed by an equal sign, followed by the double quotation mark property value.

Unordered list Unorderlist

An unordered list is a list of items that are marked with a bold dot (typically a small black circle).

The unordered list starts with the <ul> tag. Each list item starts at <li>

For example:

< ul > < Li > Coffee</li><li>Milk</  Li></ul>

There are sequence tables orderlist

Similarly, a sequence table is a list of items that are marked with numbers.

The sequence list starts with the <ol> tag. Each list item starts with the <li> label.

For example:

< ol > < Li > Coffee</li><li>Milk</  Li></ol>
A short quote

The <q> element allows you to add a short reference to the existing text.

For example:

 < P > You'll find us right in the center of downtown Webville. < Q > If you need help finding us,</q>
Our Come join us! </p>
Very long references

You can use the <blockquote> element to add a reference to a paragraph or multiple of text

For example:

< blockquote > passing cars, when you can ' t see, could get you, < BR />     A Glimpse,<br/> of    eternity. </ blockquote >
Emphasize

You can use the <em> element to mark the text you want to display in different ways, such as you want to highlight a point

For example:

< P > < em > Dance Dance Revolution</em>. Wireless access is always provided; Byows (Bring your own Web Server). </ P >

Now you know a lot of basic elements, and other display of computer code <code> elements, display time or date <time> elements and so on are not listed.

HTML simple introduction and common elements

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.