📜  如何用 HTML 设计网页?

📅  最后修改于: 2022-05-13 01:57:35.376000             🧑  作者: Mango

如何用 HTML 设计网页?

HTML 被称为超文本标记语言。它是超文本和标记语言的组合。这里的超文本是指网页之间的链接,标记用于定义标签内的文本文档,标签定义了网页的结构。它充当网页的骨架,如果没有 HTML,构建网页将非常困难或不可能。它被所有浏览器使用,用于处理文本、图像和其他内容,以便以所需的格式显示。在本文中,我们将学习如何创建 HTML 网页。

创建 HTML 文档

创建网页的第一步是创建 HTML 文档。可以在任何文本编辑器中甚至在记事本上创建 HTML 文档。因此,任何文本编辑器都可以用来制作 Html 文件。我们只需要添加扩展名.html /.htm 。让我们创建第一个基本的 HTML 程序。

要创建 HTML 文档,请执行以下步骤:

第 1 步:打开您的文本编辑器,例如 Notepad Sublimetext 等。

第 2 步:在文本编辑器中编写下面给出的代码。

HTML



First HTML file


  Hello Everyone!!



HTML



     Steps To Form Spread Cookies 


     

Spread Cookies


Steps:-

      
  1. Preheat kitchen appliance to 350ºF (180ºC).
  2.   
  3. In a massive bowl, combine along the spread, sugar, and egg.
  4.   
  5. Scoop out a spoon of dough and roll it into a ball.       Place the cookie balls onto a slippy baking sheet.
  6.   
  7. For further decoration and to form them cook additional       equally, flatten the cookie balls by pressing a fork down       on prime of them, then press it down once more at a 90º       angle to form a criss-cross pattern.
  8.   
  9. Bake for 8-10 minutes or till rock bottom of       the cookies square measure golden brown.
  10.   
  11. Remove from baking sheet and freeze it.
  12.   
  13. ENJOY!!
 


HTML



    
    GeeksForGeeks

 

     
    
     
    

GeeksForGeeks

    

Table of Content

          

C++

    
C++ is an object-oriented programming language          that is widely used for competitive programming,          Data structure, and Algorithms, developing          operating Systems, etc.
               

Some of its topic are given below:-

               

Java

    
Java has been one amongst the foremost standard          programming languages for several years. When          compared with C++, Java codes are typically          additional reparable as a result of Java          doesn't enable several things which can          cause bad/inefficient programming if used          incorrectly.For instance, non-primitives are           references in Java.     
    

Some of its Topics are given below:-

           

Python

    
Python language is being employed in website           development, Machine Learning applications,           at the side of all innovative technology in           Software World. Python  language is extremely           compatible for Beginners, additionally for           knowledgeable programmers with alternative           programming languages like C++ and Java.     
    

Some of its topics given below are:-

         

Thank You

 


第 3 步:使用 .html/.htm 扩展名保存此文件。

第 4 步:使用任何浏览器打开该文件。将显示输出。

这就是我们创建简单 HTML 文档的方式。

设计网页

要使用 HTML 设计网页,我们需要了解 HTML 中可用的标签和属性。在 HTML 中,标签是一些用尖括号括起来的指令。借助这些标签,我们可以设计出更具吸引力的 HTML 页面。一些要使用的重要标签如下:

1.

...

...
这些标签称为标题标签,它们用于为您的网页提供不同大小的标题。

...

的最大标题是最小标题。

2. 粗体标签():这些标签用于使文本看起来粗体。

3. 斜体标记():这些标记用于使文本看起来像斜体。 之间的唯一区别是 在语义上强调重要的文本或单词,而 标签用于制作仅用于制作文本斜体。

4. 有序列表(

    ...
): HTML
    标签定义了一个有序列表。有序列表可以是数字或字母。,有序列表以
      标记开始和结束。每个列表项都以
    1. 标记开头。我们可以使用 type 属性来定义我们需要制作的有序列表的类型:
      TypeDescription 
      type=”1″ Numbered with numbers(default)
      type=”A” Numbered with Uppercase Alphabets
      type=”a”Numbered with Lowercase Alphabets
      type=”I” Numbered with Uppercase Roman Numbers
      type=”i”Numbered with Lowercase Roman Numbers

      5. 无序列表(

      ):以公告形式显示元素。无序列表以
        标签开头,每个项目以
      • 标签开头。我们可以使用 type 属性来定义我们需要制作的无序列表的类型:
        TypeDescription
        type=”disc”Items are marked in Bulletin. (default) 
        type=”circle”Items are marked with hollow circles.
        type=”square”Items are marked with squares.
        type=”none”Items are not marked.

        6. 图片标签:如果我们需要向我们的网站添加图片,我们需要使用以下语法。

        句法:

        这里,

        • img:告诉浏览器我们要添加图像。
        • src:告诉图像的来源,例如来自桌面或网站的图像。
        • alt:此属性用于描述图像。如果由于某种原因图像无法在 Web 浏览器中下载,则会显示 alt。

        7. Anchor Tag:此标签主要用于将一个网页连接到另一个网页。

        句法:

        注意:嵌套在 HTML 中是可能的,这意味着我们可以在另一个标签之间写入一个标签。

        例子:

        HTML

        
        
        
             Steps To Form Spread Cookies 
        
        
             
        

        Spread Cookies


        Steps:-

            
        1. Preheat kitchen appliance to 350ºF (180ºC).
        2.   
        3. In a massive bowl, combine along the spread, sugar, and egg.
        4.   
        5. Scoop out a spoon of dough and roll it into a ball.       Place the cookie balls onto a slippy baking sheet.
        6.   
        7. For further decoration and to form them cook additional       equally, flatten the cookie balls by pressing a fork down       on prime of them, then press it down once more at a 90º       angle to form a criss-cross pattern.
        8.   
        9. Bake for 8-10 minutes or till rock bottom of       the cookies square measure golden brown.
        10.   
        11. Remove from baking sheet and freeze it.
        12.   
        13. ENJOY!!
         

        输出

        HTML 网页

        在这里,我们创建了一个简单的 GeeksforGeeks 网页。

        HTML

        
        
        
            
            GeeksForGeeks
        
         
        
             
            
             
            

        GeeksForGeeks

            

        Table of Content

                  

        C++

            
        C++ is an object-oriented programming language          that is widely used for competitive programming,          Data structure, and Algorithms, developing          operating Systems, etc.
                       

        Some of its topic are given below:-

                       

        Java

            
        Java has been one amongst the foremost standard          programming languages for several years. When          compared with C++, Java codes are typically          additional reparable as a result of Java          doesn't enable several things which can          cause bad/inefficient programming if used          incorrectly.For instance, non-primitives are           references in Java.     
            

        Some of its Topics are given below:-

                   

        Python

            
        Python language is being employed in website           development, Machine Learning applications,           at the side of all innovative technology in           Software World. Python  language is extremely           compatible for Beginners, additionally for           knowledgeable programmers with alternative           programming languages like C++ and Java.     
            

        Some of its topics given below are:-

                 

        Thank You

         

        输出: