2016 - 1 -19 初学HTML5 第一天

mac2022-06-30  16

1.HTML COMMANDS

MHTL commands called elements.Usually, an element has a start tag and an end tag

e.g. <p>.....</p>

2.HMTL PAGE STRUCTURE

<!DOCTYPE html>

<html>

<head>---------Here is head section,and it is basically some kind of information that u don't see on the web page.

....head elements here

</head>

 

<body> ----------- The body section is more things u see on the web page !

..... the main web page content goes here

</body>

 

</html>

3.A VERY SIMPLE WEB PAGE

<!DOCTYPE html>

<html>

<head>

              <title>A Simple Web Page</title> 

              <meta name = "author" content = "David  Rossiter">

</head>

 

<body>

              <h1>My Web Page</h1>------<h1> means level 1 heading

              <p>This web page is so awesome!</p>--------<p>means paragraph

</body>

</html>

4.CODE THAT GOES IN HEAD

              <title>A Simple Web Page</title> 

              <meta name = "author" content = "David  Rossiter">

  4.1 Anything in <head> is information about the web page , and does not usually get shown in the page.

So,the two lines state the title and the author.

  4.2 All the information is told to the browers!

5.ATTRIBUTES

 1.U need to use speech marks for any HMTL arributes,also the doule speech mark  and the single speech mark are fine for browers.

            e.g.  <meta name = "author" content = "David  Rossiter"> or 

              <meta name = 'author' content = 'David  Rossiter'>

 

转载于:https://www.cnblogs.com/BJTUzhengli/p/5143811.html

最新回复(0)