QUIZGUM

Coding Class

Quizgum : list Tag and link Tag

Let's learn about list tag and link tag ^-^

When searching internet, we could see the menu. Most of menus are made up of list tags.

A list tag has a numberless form and a numbered form. If there is no number, start with <ul> as below.

  1. <ul>
  2. <li>content1</li>
  3. <li>content2</li>
  4. <li>content3</li>
  5. </ul>
  6.  
  7. if you want number <ol>
  8.  
  9. <ol>
  10. <li>content1</li>
  11. <li>content2</li>
  12. <li>content3</li>
  13. </ol>
  14.  
  15. <li></li> is start and end of list
  16.  
  17. <li>honda</li> If you do this, only one honda menu will appear.
  18.  
  19. <li>google</li>
  20. <li>apple</li>

If you type tags as abobe, the menu will list two, google and apple.

So let 's practice, typing the source.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>making list</title>
  6. </head>
  7. <body>
  8. <h2>making list</h2><br />
  9. <h3>list without number</h3>
  10. <ul>
  11. <li>honda</li>
  12. <li>google</li>
  13. <li>apple</li>
  14. </ul>
  15. <br />
  16. <h3>list with number</h3>
  17. <ol>
  18. <li>honda</li>
  19. <li>google</li>
  20. <li>apple</li>
  21. </ol>
  22. </body>
  23. </html>

Let's look at the results.


list_tag

Let's learn about hyperlinks from now on.


When we click news on google, etc., we move to somewhere, which is the hyperlink.


  1. <a href="url to move">link name<a>

You can also create links to download files. Inside the tag, type “download”.

  1. <a href="url to download" download>link name<a>

Let's do it now.

This is the hyperlink tag.
<a href="address"> Contents, text, images, etc. that you would like to make a link</a>

So let's test it with the list source we have practiced. ^^


<li></li>We'll put a hyperlink tag inside the tag.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>hyper link</title>
  6. </head>
  7. <body>
  8. <h2>hyper link</h2><br />
  9. <ul>
  10. <li><a href="https://www.apple.com">apple</a></li>
  11. <li><a href="https://www.quizgum.com">startwebcoding</a></li>
  12. <li><a href="http://www.cybercronox.com">cybercronox</a></li>
  13. </ul>
  14. </body>
  15. </html>

Please test the above source and click google, Daum or Nate

hyperlink_tag

If you click on the link in the sample above, does it move directly from the web browser you are currently viewing?
So let's open a new window and find out how to get the page you want from there.
Put a target="_blank” in a tag. Let's test it with the target blank in the above source.
Please write the source as below.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>hyper link</title>
  6. </head>
  7. <body>
  8. <h2>hyper link</h2><br />
  9.  
  10. <ul>
  11. <li><a href="https://www.apple.com" target="_blank">apple</a></li>
  12. <li><a href="https://www.quizgum.com" target="_blank">startwebcoding</a></li>
  13. <li><a href="http://www.cybercronox.com" target="_blank">cybercronox</a></li>
  14. </ul>
  15. </body>
  16. </html>

Let's test it. ^^


hyperlink_tag_target

As shown above, google appears in a separate window

The following example downloads an image.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>download quizgum character</title>
  6. </head>
  7. <body>
  8. <a href="/material/images/main/happyCatHeader.png" download>Image Download<a>
  9. </body>
  10. </html>

result

download

Then I will finish this lesson here and see you next time. In the next lesson, let's pop up an image. ^^