day1- the front entry

Learn greatly Outline

html——>CSS——>Javascript

html equivalent to a skeleton of a person, css is meat and clothes, js is the action, together constitute the front end.

<html>
    <head>
        <title>这是啊字的第一个网页</title>
    </head>
    <body><h1>这是啊字的第一个网页</h1></body>
</html>

With a text document you can write html, and there must be <html> tag, and all things shall be written in the root tag inside. Also <head> tag <title> and <body> tag. <Title> inside what to write, you will write what web page labels, as well as search engine at the time of the search page, will first retrieve the contents of the title tag, you must give the user see things written in the <body> inside .

html comments

<html>
    <head>
        <title>这是啊字的第一个网页</title>
    </head>
    <body>  <!--
            注释内容
            -->
            <h1>这是啊字的第一个网页</h1></body>
</html>

In the <-! -> This coupled with the inside content will not show up on the page, only to see where in the source code. We can write HTML comments in this structure, in order to describe the code to help other developers work,

Be sure to develop good habits of writing comments, the contents of the comment must be simple and clear.

img

Property of the label

<html>
    <head>
        <title>这是啊字的第一个网页</title>
    </head>
    <body>  <!--
            注释内容
            -->
            <h1>这是啊字的第一个网页</h1></body>
</html>

Or the code.

If we want this time, "ah word" to become larger or change color how to do? This time there will be a <font> tag

<html>
    <head>
        <title>这是啊字的第一个网页</title>
    </head>
    <body>  <!--
            注释内容
            -->
            <h1>这是<font color="green" size="7">啊字</font>的第一个网               页
            </h1>
    </body>
</html>

There are three parameters of a font, font but this label is not recommended, as we have said before, html bones, meat and clothing css, js is action, so this should be handed over to css to do.

Document declaration

Because until now there are several different specifications, so in order to let the browser know that use specifications to see your code must be written before the main code, which is the very top, to write the document declaration.

We usually use html5, so be on the label and wrote <html> <! Doctype html>, which is declared in accordance with the current page is written in HTML5 standard, if you do not write the document declaration will result in some browser to access a quirks mode, then enter quirks mode, the browser parses the page will lead to pages not display properly in order to avoid entering this mode, the document must write a statement.

Guess you like

Origin www.cnblogs.com/chanyuli/p/11517646.html