html learning notes

#Study notes for the first week
##November 15
First your own web page

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>This is my first web page</title>
    <a href="https://Www.bilibilili. COM / "title =" China's best animation website "> BiliBili</a>
    <h1 title="this is my frist page ">
        Li Yi's first website
    <img src="">

Understanding of some key things (the above code is an example)

Prompt the class content under the browser HTML5 Standard rendering for
<html lang="en">
Tell the natural language under the browser why the language (English, Chinese, etc.)
<meta charset="UTF-8">
Explain what standard the following contents are stored in the computer, here refers to uncoine 8 Standard of
<meta http-equiv="X-UA-Compatible"
Solve the problem of mobile terminal

About the composition of each element
Overall element
Element = start tag < > + end tag < / > + element content + element attribute
Element attribute = attribute name + attribute value
Attributes: global attributes (common to all elements)
Local attributes (attributes of some elements)
###What is semantics?
Semantics is the meaning represented by each element.
For example, the h1 element represents a first-class title, and the p element represents a paragraph. What each element displays has nothing to do with semantics. It is displayed according to the default css code, and all displays can be changed through css,
So we can't think about what kind of display we need to write an element.
##November 16
Text element h element p element pre element span element
The following are introduced one by one;
####h element (Title element)
The following is the code display (body part)


The following is the running effect





(the display effect can be modified, so it does not mean that the difference between titles at all levels is their display content)

p element (paragraph element)

Code display

    <p>Lorem ipsum dolor sit amet consectetur adipisicing.</p>
    <p>Quibusdam, at quisquam dolorum exercitationem consectetur magnam!</p>
    <p>Animi, tenetur dignissimos ad architecto id deleniti!</p>

Show code effects

Lorem ipsum dolor sit amet consectetur adipisicing.

Quibusdam, at quisquam dolorum exercitationem consectetur magnam!

Animi, tenetur dignissimos ad architecto id deleniti!

####pre element
There will be blank folding in the web page display, that is, when there are multiple blank symbols, only one blank symbol will be displayed, and the pre element can retain multiple elements in the element content.
The following is the code display

    <pre> I love  messi   messi is the best player </pre>

Effect display

 I love Messi is the best play 
####The span element has no semantics. In order to add special attributes to something (written through css), it is not displayed because it has not learned css.

Block level elements and row level elements (previously, there was no such concept in the html5 standard)
Block level elements: one row is exclusive
Row level element: does not monopolize a row
####a element
Hyperlink element
href hyperlink properties
#####1. The simplest hyperlink jump is realized through the a element
code implementation

    <a href="">bilibili</a>


Code effect


#####2. Jump within the article through hyperlinks

   <a href="#cp1">1 chapter</a> <a href="#cp2">2 chapter</a> <a href="#cp3">3 chapter</a> <a href="#cp4">4 chapter</a> <a href="#cp5">5 chapter</a> <a href="#CP6 "> Chapter 6</a>
   <h2 id="cp1">1 chapter</h2>
   <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae sunt quidem aliquam tempora consequuntur perferendis explicabo excepturi provident nam iure? Atque perspiciatis consequuntur itaque molestiae, cupiditate laudantium amet est unde nisi cum a fuga mollitia nostrum eligendi consectetur reiciendis corporis? Dolore iste deleniti, dolores modi sint est. Voluptate, beatae esse eos incidunt eum, iusto, earum nisi sit cupiditate commodi ea! Ipsum pariatur consequuntur eos molestias accusantium, laudantium qui commodi sequi, aperiam, laboriosam asperiores rem facere doloribus sunt hic et. Molestiae iusto explicabo distinctio neque eveniet quae deleniti possimus obcaecati animi a! Quaerat repellendus recusandae ipsum, architecto officia quidem blanditiis? Labore.</p>
   <h2 id="cp2">2 chapter</h2>
   <p>Fugiat non aspernatur laudantium nesciunt quos alias eveniet sunt omnis minima sed iure, maxime facere, vero modi rerum expedita ab? Odit, harum totam quam vel dolor, voluptatem architecto cumque repellendus id quis dignissimos alias minima accusantium adipisci ratione culpa repudiandae maiores in pariatur expedita? Ipsam natus officiis repellendus nobis eos deleniti! Nam, laboriosam. Rem consectetur eveniet ipsum qui, sed necessitatibus! Nesciunt similique fuga dolorem dolores amet rerum dolorum exercitationem nulla, iusto voluptate odit nisi earum ut tempore eligendi sit ad quasi cumque dolore cum? Labore itaque id repellat aut distinctio pariatur? Saepe voluptates laboriosam maiores suscipit at incidunt tenetur aperiam!</p>
   <h2 id="cp3">3 chapter</h2>
   <p>Deleniti illum voluptatibus, ad amet cum distinctio quas nesciunt modi maxime at iste nostrum expedita soluta placeat sit iure odio fuga, odit, provident animi consectetur eveniet eos debitis dignissimos! Soluta similique, doloribus autem maiores a dolores. Pariatur libero nostrum, sit minima exercitationem, soluta, eius a corrupti porro laborum odit voluptatem molestias atque. Voluptate nesciunt ipsam ut animi cum deserunt, neque, cumque nemo similique nisi doloremque culpa magnam repudiandae est ullam tenetur at suscipit omnis architecto, delectus corrupti? Alias incidunt earum quidem, modi in odit natus, tenetur asperiores, ad minus iure. Labore quia repellendus distinctio id doloremque, explicabo earum! Rerum, nemo?</p>
   <h2 id="cp4">4 chapter</h2>
   <p>Quibusdam maiores ducimus iste cumque saepe facilis deserunt quisquam expedita hic eos earum, sunt non nisi harum explicabo distinctio voluptate! Eos reprehenderit cum a, fuga saepe, quia aliquam odio officiis temporibus repellat adipisci magni, quo necessitatibus odit deserunt neque fugit doloremque amet. Eveniet aspernatur architecto, minima porro, vitae fugit laudantium rem repellendus ex, modi voluptatem illum corrupti et repellat qui nesciunt harum est distinctio voluptas autem dolorum sapiente quia enim. In quas quos consectetur labore quaerat, provident, voluptatum iusto officia enim numquam, aliquid consequatur eaque exercitationem nisi. Ullam, alias perspiciatis recusandae eum ducimus nisi dolore saepe iusto enim assumenda natus?</p>
   <h2 id="cp5">5 chapter</h2>
   <p>Magnam, consectetur? Quae repudiandae, quos inventore eligendi quidem, sequi est reiciendis dolorum libero assumenda dicta magni provident sint modi eius impedit consectetur error deserunt repellat minima magnam nihil explicabo fuga nulla. Reiciendis architecto labore at a dolore officiis eaque autem doloribus laboriosam! Rerum est ut corporis consequuntur quod? Dolorem atque, optio ipsa quis quidem culpa nesciunt officiis voluptatum nostrum minima dolor praesentium repellendus quas quam ea. Saepe ipsa aut, ipsum omnis sequi totam quidem voluptate deleniti qui corrupti dolorem consectetur corporis nam blanditiis dolores quaerat iusto nulla exercitationem facilis quos voluptatem eligendi ad perspiciatis vel. Fuga facere fugiat repellat maxime.</p>
   <h2 id="cp6">6 chapter</h2>
   <p>Aliquam nihil dolor beatae ducimus, ad harum exercitationem vel minima assumenda odit obcaecati similique nemo, earum soluta, incidunt natus et facilis mollitia vero. Illo natus odio amet sequi, quod, harum optio vero ratione nam quia, aliquam perspiciatis ducimus quam autem blanditiis totam? Numquam veritatis pariatur iure accusamus minus veniam debitis. Ab est dolores, facere natus, placeat nam vero voluptate ducimus at officiis quo itaque labore? Esse ipsum in ullam totam accusantium, aliquam atque deserunt est autem saepe quos, veritatis natus facilis quidem dolorum ipsam a maiores, hic quasi vitae! Nulla hic nesciunt omnis quasi eveniet eaque ab natus reiciendis rem.</p>

The code can generate lorem 1000 if you want to have a better display effect, but it will make the copy too long.
Notes of the above code
id is a global attribute
There are three kinds of links: 1. Ordinary link 2. Anchor link 3. Function link (trigger js code and execute function)
The link above is an anchor link.
About target attribute
_ Blandk (open in a blank window)
_ Self (overwrite itself is opened on the current page)

    <a href="" target="_blank">bilibili</a>
    <a href="" target="_ Self "> tiger teeth</a>
The code is as follows
bilibili Tiger tooth ###html entity characters are actually very simple. If some special symbols cannot be printed directly, use this method to &#+ numbers (each character has its own number & + letter (representing the character) ####Path writing in station resource: relative path out of station resource: absolute path absolute path writing format protocol name: / / host name: port number / path relative path writing. / beginning. / b indicates the directory where the current resource is located. / indicates the current file. / indicates the upper level file

##November 17th
####Picture element
ima element
src attribute; address of picture
alt attribute; the description of the picture when it is invalid
The ima element is used with the alt element and the a element figure
Here is the code written

            <h2 title=" The best">messi</h2>
            <a  href="" target="_blank">
                <img usemap="#me-ssi" src="" alt="messi">
             <map name="me-ssi">
                <area shape="circle" coords="537,836,50" href="" target="_blank" >


##November 18
###Multimedia elements
####Video video
The link path ends in. mp4 format

<video src=""></video>

####Audio audio
The link ends with a general book. mp3

<audio src=""></audio>

Some properties for video and audio
1 controls
Control the display of controls (pause fast forward, etc.)
2 autoplay
Auto play
Autoplay is not supported in some browsers
Because it will create a bad experience for users
3 muted
Mute playback, because some browsers can't support automatic playback, but as long as they mute playback
4 loop
Loop Playback
Because some browsers do not support MP3, we can add a sub element source in the video in consideration of compatibility
In source, two src formats can be used, one is MP4 format and the other is media format
###List element
####Ordered list
ol(ordered list)
li(list item)

        How many steps does it take to put an elephant in the refrigerator
Open the refrigerator
    Put the elephant in the fridge
    Turn off the refrigerator

Display effect

  1. How many steps does it take to put an elephant in the refrigerator
  2. Open the refrigerator
  3. Put the elephant in the fridge
  4. Turn off the refrigerator
In ol, you can use the type attribute to modify different styles for the displayed serial number, such as English letters and Arabic letters. For example, you can modify the above to the following effect, but generally you won't use the type to modify the style, because all style modifications are cssde work, but for some highly logical and special requirements, you still use type, such as f legal provisions
  1. How many steps does it take to put an elephant in the refrigerator
  2. Open the refrigerator
  3. Put the elephant in the fridge
  4. Turn off the refrigerator
####Unordered list UL ` ` ` admission conditions of XXX University
  • College entrance examination 500 points
  • good health
  • Dear teachers
```Admission conditions of xxx University
  • College entrance examination 500 points
  • good health
  • Dear teachers
Unordered list length is used for menu news list ### definition list dl sub elements, including dd dt ` ` ` offside interpretation
        The popular understanding of offside is
        There was no defense in front of the attacker at the moment of passing the ball
```The #### container element represents an area inside the element, which is used to place other things. Div element (without semantics) header element (usually representing page header or article header), footer (usually representing page footer or article footer) artistic (article body) Generally, you can use header in article, h1 in header, section to represent a chapter, and aside to represent sidebar. In most actual development, you can use div to describe the inclusion relationship of le ### elements. Block level elements can include row level elements, but row level elements cannot include row level elements. Block level elements wrap lines, and row elements do not wrap lines The inclusion rule needs to consider semantics. In use, if you want to know that the direct query a element can basically include any element. 2 the container element can include all elements. 3 some elements include fixed elements. 4 the title element and paragraph element cannot be nested with each other, and the container element cannot be included

Tags: html css

Posted on Fri, 19 Nov 2021 11:43:51 -0500 by mohamed42