Home Web Front-end HTML Tutorial Sharing small exercises suitable for novices in html

Sharing small exercises suitable for novices in html

May 12, 2018 am 10:48 AM
html share practise

Question 1 examines the title tag

Sharing small exercises suitable for novices in html

Sharing small exercises suitable for novices in html

#

appears in inside head<span style="font-family:'楷体', '楷体_GB2312', SimKai;">></span> represents the title of the page. Visually, we can see it in the title bar (tab bar) of the browser. <span style="font-family:'楷体', '楷体_GB2312', SimKai;"></span><span style="font-family:'楷体', '楷体_GB2312', SimKai;"></span>BCorrect. <p><span style="font-family:'楷体', '楷体_GB2312', SimKai;"> </span></p> <p>Question 2 examines the essence of HTML</p> <p style="background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;"></span></p> <p>##Answer: D<img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/194/e3fe2b8b2b3caf68d46305ba97da9901-2.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Sharing small exercises suitable for novices in html" title="1.PNG"></p> <p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;"> Analysis: First of all, HTML only relies on tag pairs to express semantics, and it has nothing to do with whether it is indented or newline; as long as the tags have the correct nesting relationship and the correct parent-child relationship, then It is a legal HTML structure and does not necessarily need to be indented. Baidu's homepage, in order to reduce the file size, is not indented. When it comes to the role of HTML, we can only think about it in terms of semantics, never in terms of style. So C is wrong. D is correct. </span></p> <p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">Question 3 Examine common attributes</span></p> <p style="background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;"></span></p> <p>Answer: D. <img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/194/e3fe2b8b2b3caf68d46305ba97da9901-3.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Sharing small exercises suitable for novices in html" title="1.PNG"></p> <p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">This question mainly tests the tags for inserting pictures and hyperlinks. These two sentences are relatively easy to remember. It is best for everyone to remember some commonly used tag sentences. </span></p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>1 <img src="/static/imghw/default1.png" data-src="1.jpg" class="lazy" / alt="Sharing small exercises suitable for novices in html" > 2 3 <a href="1.html">点击我</a></pre><div class="contentsignin">Copy after login</div></div><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">img is image "image"; </span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">src is source "resource"; </span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">a is anchor "anchor"; </span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">href is hypertext reference "hypertext address" </span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">Question 4 examines the principles of HTTP</span></p><p style="background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;"></span></p><p>Answer: B. <img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/194/e3fe2b8b2b3caf68d46305ba97da9901-4.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Sharing small exercises suitable for novices in html" title="1.PNG"/></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">There are some files on the server, such as html, pictures, css, and js files, which are transferred to the user's computer through HTTP requests. Therefore, on the second visit, these images do not need to be transferred, so the page becomes faster. </span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">A, wrong, there is no so-called VIP channel. </span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">B, correct</span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">C, incorrect. Because HTTP is not a persistent connection protocol, it is pulled down after transmission and the connection is closed, so there is no continuous path. </span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">D, error. Each visit is a different addressing process, and the path will not be "recorded". </span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;"></span></p><p><span style="font-size:14px;line-height:125%;font-family:'Times New Roman', serif;color:#FF0000;"><br/>Question 5 Plain text</span></p><p style="text-indent:28px;"><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/194/a73a4232f018d580aa0b68402e1afe9e-5.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Sharing small exercises suitable for novices in html" title="1.PNG"/></p><p style="text-indent:28px;">答案:C。</p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">用记事本打开,不是乱码,是可读的,那么一定是纯本文文件。只有文本,没有样式,没有语义。</span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">所以,.java文件是纯文本的,.class文件不是纯文本的。</span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">所有的纯文本文件都能用记事本、notepad++、editplus、sublime编辑。</span></p><p style="background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">第6题 考察XHTML</span></p><p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/194/a73a4232f018d580aa0b68402e1afe9e-6.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Sharing small exercises suitable for novices in html" title="1.PNG"/></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">答案:B。</span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">所有的标签名、属性都要小写,必须使用引号,必须封闭。答案是B</span></p><p style="background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">第7题 考察定义列表</span></p><p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/194/a73a4232f018d580aa0b68402e1afe9e-7.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Sharing small exercises suitable for novices in html" title="1.PNG"/></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">答案:B。</span></p><p style="background:#CCFFFF;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">一定要记住每个标签标示什么,就是英语原意是什么?比如</span></p><p style="background:#CCFFFF;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">dl 就是definition list, 定义列表;</span></p><p style="background:#CCFFFF;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">dt 就是definition title,定义标题;</span></p><p style="background:#CCFFFF;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">dd就是definition description,定义描述</span></p><p style="background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">第8题 考察相对路径</span></p><p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/194/a73a4232f018d580aa0b68402e1afe9e-8.png" class="lazy" style="max-width:90%" style="max-width:90%" alt="Sharing small exercises suitable for novices in html" title="1.PNG"/><br/></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">1.html中,有一个能够点击的图片。所以骨架:</span></p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>1 <a href=""><img src="/static/imghw/default1.png" data-src="../../photo/kaola.png" class="lazy" / alt="Sharing small exercises suitable for novices in html" ></a></pre><div class="contentsignin">Copy after login</div></div><p style="max-width:90%"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">href里面是相对路径,要从1.html出发找到2.html;</span></p><p style="text-indent:28px;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">src里面也是相对路径,要从1.html出发找到kaola.png。</span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">标准答案:</span></p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>1 <a href="../myweb2/2.html" target="_blank"><img src="/static/imghw/default1.png" data-src="../../photo/kaola.png" class="lazy" / alt="Sharing small exercises suitable for novices in html" ></a></pre><div class="contentsignin">Copy after login</div></div><p><span style="max-width:90%">我们一直在用的是相对路径,就是从自己出发找到别人。用相对路径的好处很明显,就是站点文件夹可以拷着走。</span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">相对路径的好处:站点不管拷贝到哪里,文件和图片的相对路径关系都是不变的。</span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">相对路径使用有一个前提,就是网页文件和你的图片,必须在一个服务器上。</span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">比如,你现在想插入一个新浪网上的图片,那么就不能用相对路径。就要用绝对路径。</span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">绝对路径非常简单,所有以http://开头的路径,就是绝对路径。 </span></p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><img src="/static/imghw/default1.png" data-src="http://i1.sinaimg.cn/dy/deco/2013/0329/logo/LOGO_1x.png" class="lazy" alt="" /> <a href="http://www.sohu.com">点击我跳转到搜狐</a></pre><div class="contentsignin">Copy after login</div></div><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;background-color:rgb(204,255,255);">如果我的网页在</span><span style="font-family:'楷体', '楷体_GB2312', SimKai;background-color:rgb(204,255,255);">C</span><span style="font-family:'楷体', '楷体_GB2312', SimKai;background-color:rgb(204,255,255);">盘,图片却在</span><span style="font-family:'楷体', '楷体_GB2312', SimKai;background-color:rgb(204,255,255);">D</span><span style="font-family:'楷体', '楷体_GB2312', SimKai;background-color:rgb(204,255,255);">盘,能不能插入呢?</span><span style="font-family:'楷体', '楷体_GB2312', SimKai;"> </span></p><p style="background:#CCFFFF;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">答案:用相对路径不能,用绝对路径也不能。</span></p><p style="background:#CCFFFF;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">注意,可以使用file://来插入,但是这种方法,没有任何意义!因为服务器上没有所谓c盘、d盘。</span></p><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;">下面的方法是行的,但是没有任何工程上的意义,这是因为服务器没有盘符,linux系统没有盘符,</span></p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'><img src="file://C:\Users\Danny\Pictures\ 明星 \1.jpg" alt="" /></pre><div class="contentsignin">Copy after login</div></div><p><span style="font-family:'楷体', '楷体_GB2312', SimKai;background-color:rgb(255,153,204);">总结一下:</span><span style="font-family:'楷体', '楷体_GB2312', SimKai;"> </span></p> <p style="text-indent:28px;background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">我们现在无论是在a标签、img标签,如果要用路径。只有两种路径能用,就是相对路径和绝对路径。</span></p> <p style="text-indent:28px;background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">相对路径,就是../   image/ 这种路径。从自己出发,找到别人;</span></p> <p style="text-indent:28px;background:#FF99CC;"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">绝对路径,就是http://开头的路径。</span></p> <p style="text-indent: 28px; background: rgb(255, 153, 204);"><span style="font-family:'楷体', '楷体_GB2312', SimKai;">绝对不允许使用file://开头的东西,这个是完全错误的!!</span></p>

The above is the detailed content of Sharing small exercises suitable for novices in html. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles