⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lesson3.html

📁 黑客培训教程
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Lesson 3: Basic Tags and Formatting</TITLE>

</HEAD>



<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<H2>Lesson 3: Basic Tags and Formatting</H2>



So you're probably thinking "Okay, I knew that stuff.  Teach me something I <u>don't</u> know."  Okay, be patient.  I think this lesson will give you your fill.<p>



HTML is a language that is coded with <i>tags</i>.  They are called tags because they tag parts of a webpage for formatting in a browser.  HTML tags are very easy to spot in web page source.  They are the things shown that start with a < and end with a >.  Most HTML tags have an opening tag (&#60;tag&#62) to start formatting text and a closing tag (&#60;/tag&#62) to end the formatting.   <p>



There are some HTML tags that are absolutely necessary in an HTML page.  Those tags are as follows:<p>



&#60;HTML>' and &#60;/HTML>': Usually put at the top (&#60;HTML>) and bottom (&#60;/HTML&#62) of an HTML page.  This tag tells the browser that this page is an HTML page.<p> 



&#60;HEAD&#62 and &#60;/HEAD&#62: This is where information about the entire page is placed.<p>



&#60;TITLE&#62 and &#60;/TITLE&#62: This tag needs to be put between the &#60;HEAD&#62 and &#60;/HEAD&#62.  This tag gives a name for your page.  The name won't be shown in the the text of the page, but rather in the top of the browser window.<p>



&#60;BODY&#62 and &#60;/BODY&#62: This tag defines the body portion of the page.  Later we will learn how to use the &#60;BODY&#62 tag to add background colors, text colors, and margins.<p>



Now that we know the required tags, I'm going to put my text that I gathered in the <A HREF="lesson2.html">last lesson</A> in the proper web page format.<p>



&#60;HTML&#62;<br>

&#60;HEAD&#62;<br>

&#60;TITLE&#62;Justin's Homepage&#60;/TITLE&#62;<br>

&#60;/HEAD&#62;<p>



&#60;BODY&#62;



Welcome to Justin's Web Page!<p>



Hi, My name is Justin.  I built this web page because I 

love coding in HTML!  I could do it all day long!<p>



I am a lover of programming languages, and love to design 

and produce web content.<p>



Thanks for visiting my page!<p>



Yours Truly,<br> 

-Justin

<p>

&#60;/BODY&#62;

&#60;/HTML&#62;



But wait 1 second! I typed that, and opened it with my browser, and it does'nt come out like that!  What? Does it come out like this:<p>



Welcome to Justin's Web Page!

Hi, My name is Justin.  I built this web page because I 

love coding in HTML!  I could do it all day long!

I am a lover of programming languages, and love to design 

and produce web content.



Thanks for visiting my page!



Yours Truly, 

-Justin

<p>



Yes? Ohmygod! We forgot the formatting tags!<p>



The &#60;p&#62; tag can add paragraph spacing to your page.  The &#60;BR&#62; tag adds a single line break to your page.<p>



These tags do not need a &#60;p&#62; and &#60;/p&#62;, or &#60;BR&#62; and &#60;/BR&#62;, unlike the other tags.<p>



So now our page is coded like this:<p>



&#60;HTML&#62;<br>

&#60;HEAD&#62;<br>

&#60;TITLE&#62;Justin's Homepage&#60;/TITLE&#62;<br>

&#60;/HEAD&#62;<p>



&#60;BODY&#62;<p>



Welcome to Justin's Web Page!&#60;p&#62;<p>



Hi, My name is Justin.  I built this web page because I 

love coding in HTML!  I could do it all day long!&#60;p&#62;<p>



I am a lover of programming languages, and love to design 

and produce web content.&#60;p&#62;<p>



Thanks for visiting my page!&#60;p&#62;<p>



Yours Truly,&#60;BR&#62;<BR>

-Justin<p>



&#60;/BODY&#62;<BR>

&#60;/HTML&#62;<p>



Great! We have format! Now i'll bet you want that first line to be large, right? This can be accomplished by what's called a "header".  The header is made by putting in &#60;Hx&#62; "header text goes here" &#60;/Hx&#62;, where the "x" is a number from 1-6, the bigger the number the bigger the header.  So in our page it looks like &#60;H2&#62;Welcome to Justin's Web Page!&#60;/H2&#62;.  Note that i removed the &#60;p&#62; tag, since header are already paragraph spaced!<p>



Go ahead and make your page, save it with a ".html" extension at the end (HTML pages all need either .htm or .html extensions) open it with your browser and meet me at the <A HREF="lesson4.html">next lesson!</A><p>





<A HREF="../main3.html">Back to Blacksun's Mainpage</A>

</BODY>

</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -