How to make an html document

How to create an HTML Document?

HTML stands for Hyper Text Markup Language. It is the most widely used language to write web page. HTML document defines the structure of web page.

HTML document begins with the declaration, and the HTML documents start and end with the and tags.

HTML document is split into two parts −

The head which contains the information about the document title etc. The information inside this tag does not display outside (on web page). The information of the head part is placed between … tags.

Example

Following is the example program for the head tag.

DOCTYPE html> html> head> title>HTML Articles-This is a title of the page title> head> body> body> html>

Following is the output for the head tag and the information inside the head tag does not display on the web page.

The information inside the head tag gets displayed in the title bar of the browser.

The body contains the content of the document, which gets displayed on your screen. The information of the body is placed in between … tags.

Example

Following is the example program for the body tag.

DOCTYPE html> html> body> p>The paragraph which are need to display on the web page are to be placed in between the paragraph tags.p> body> html>

On executing the above HTML code, the information inside the body tag gets displayed on the browser.

Creating a complete document with head and body tag.

Follow the steps to create HTML document.

  • Open a text editor Notepad++.
  • Write your HTML code into Notepad++.
  • Save the file with .html extension.
  • Run the file.

Example

Below is the structure of the HTML page.

DOCTYPE html> html> head> title>HTML Articlestitle> head> body> p>The paragraph which are need to display on the web page are to be placed in between the paragraph tags.p> body> html>

On executing the above program, the information about the head tags gets displayed on the title bar and, the information inside the body tag displayed on the browser.

Источник

How to Create a Simple Web Page with HTML

This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.

The wikiHow Tech Team also followed the article’s instructions and verified that they work.

This article has been viewed 4,543,027 times.

This wikiHow teaches you how to write a simple web page with HTML (hypertext markup language). HTML is one of the core components of the World Wide Web, making up the structure of web pages. Once you’ve created your web page, you can save it as an HTML document and view it in your web browser. Creating an HTML page is possible using basic text editors found on both Windows and Mac computers.

Adding a Head to Your HTML

Image titled 4082 1 2

Windows Start

Mac Spotlight

Image titled 4082 2 2

Type in and press ↵ Enter . This tells the web browser that this is an HTML document. [1] X Research source

Image titled 4082 3 2

Image titled 4082 4 2

Type in and press ↵ Enter . This is the tag that opens your HTML head. The HTML head information that is not usually displayed on your web page. This information can include, the title, meta data, CSS style sheets, and other scripting languages. [2] X Research source

Image titled 4082 5 2

Image titled 4082 6 2

Image titled 4082 7 2

Image titled 4082 8 2

Type and press ↵ Enter . This is the tag to close your head. Your HTML code should look something like this.

 html> head> title>My Web Pagetitle> head> 

Adding a Body and Text to Your HTML

Image titled 4082 9 2

Type in below the closed «Head» tag. This tag opens the body of your HTML document. Everything that goes in the HTML body displays on the web page.

Image titled 4082 10 2

Type in . This is the tag to add a heading to your HTML document. A Heading is large bold text that typically goes at the top of your HTML document.

Image titled 4082 11 2

Image titled 4082 12 2

    Add additional headings as you go. There are six different headings that you can create by using the through tags. These create headings of different sizes. For example, to create three different-sized headings in succession, you might write the following:
h1>Welcome to My Page!h1> h2>My name is Bob.h2> h3>I hope you like it here.h3> 

Image titled 4082 13 2

Type

. This is the tag to open a paragraph. Paragraph text is used to display normal sized text.

Image titled 4082 14 2

Type some text. This can be a description for your web page or any other information you wish to share.

Image titled 4082 15 2

Type

after your text and press ↵ Enter . This the tag to close your paragraph text. The following is an example of paragraph text in HTML:

  • You can add multiple paragraph lines in a row in order to create a series of paragraphs under one heading.
  • You can change the color of any text by framing the text with the and tags. Make sure to type your preferred color into the «color» section (you’ll keep the quotes). You can turn any text (e.g., headers) into a different color with this set of tags. For example, to turn a paragraph’s text blue, you would write the following code:

    Whales are majestic creatures.

  • You can add bolds, italics and other text formats using HTML. The following are examples of how you can format text using HTML tags: [3] X Research source
b>Bold textb> i>Italic texti> u>Underlined textu> sub>Subscript textsub> sup>Superscript textsup> 

Источник

How to Write an HTML Page

This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher.

The wikiHow Tech Team also followed the article’s instructions and verified that they work.

This article has been viewed 309,987 times.

This wikiHow teaches you how to create a webpage using HTML. Some elements of your webpage can include text, links, and images.

Preparing to Write

Image titled Write an HTML Page Step 1

Windows Start

Mac Spotlight

Image titled Write an HTML Page Step 2

  • For example, a paragraph is created by typing the open paragraph tag (

    ), entering the text that you want to use, and then entering a closed paragraph tag

    .

  • Each line of code must go on its own line, so you’ll normally press ↵ Enter after writing a line of code.

Image titled Write an HTML Page Step 3

Image titled Write an HTML Page Step 4

Consider learning about CSS. CSS is a language that acts as a complement to HTML; it covers page formatting (e.g., colors, centered text, etc.) and other visual aspects of the webpage.

Creating a Text Page

Image titled Write an HTML Page Step 5

Image titled Write an HTML Page Step 6

Image titled Write an HTML Page Step 7

  • Headers can be stacked throughout the page. For each header you use after the first one, just increase the number (e.g., for the second header, use ).

Image titled Write an HTML Page Step 8

Image titled Write an HTML Page Step 9

Repeat the header and paragraph process. You can add as many headers and paragraphs to your webpage as you like.

Image titled Write an HTML Page Step 10

Add breaks in your page. Type in
Text
and press ↵ Enter . This will create page gaps between your paragraphs if you want to space different parts out.

Image titled Write an HTML Page Step 11

  • text — Creates italic text.
  • text — Creates bold text.
  • text — Creates underlined text.
  • text — Creates text with a line through it.
  • text — Creates small text.
  • — Creates invisible text. Used for adding notes to your webpage.

Image titled Write an HTML Page Step 12

Close your document’s BODY and HTML tags. When you’re finished adding text, type in and press ↵ Enter , then type in to close out the document. Now that your text page is technically complete, you can add other things like links, bullet points, and images to it.

Image titled Write an HTML Page Step 13

Find a place in your webpage to add a link. If you want to add a link to a webpage in the middle of a paragraph, for example, you’d go to that paragraph and find the word or phrase that you want to use as the link.

Image titled Write an HTML Page Step 14

Copy the website’s URL. Go to the website to which you want to link, then select its address in the bar near the top of the window and press Ctrl + C (Windows) or ⌘ Command + C (Mac).

Image titled Write an HTML Page Step 15

Enter an open link tag. Type into the space directly before the word or phrase that you want to use as a link.

Image titled Write an HTML Page Step 16

Image titled Write an HTML Page Step 17

Image titled Write an HTML Page Step 18

Adding Bullet Points

Image titled Write an HTML Page Step 19

Find a place in which to add bullet points. Bullet points are best-suited for listing information or creating organized steps. Once you’ve found a paragraph beneath which you want to add bullet points, proceed.

Image titled Write an HTML Page Step 20

Add a page break. Above the place where you want to put your bulleted list, type in
and press ↵ Enter .

Image titled Write an HTML Page Step 21

Image titled Write an HTML Page Step 22

Add more bullet points. As long as you’re using the tags around lines of text, the text between the tags will be formatted as a bullet point.

Image titled Write an HTML Page Step 23

Image titled Write an HTML Page Step 24

Close your page break. If you chose to use a page break earlier, type in
and press ↵ Enter . Your bulleted list will stand alone on the page.

Adding Images

Image titled Write an HTML Page Step 25

Find a place to insert an image. The image will appear on the webpage wherever you insert the code for the image.

Image titled Write an HTML Page Step 26

Create the image tag. To do so, type in

Image titled Write an HTML Page Step 27

Add the «source» tag. Type in src= after the

Image titled Write an HTML Page Step 28

Enter an image’s address. Copy the URL for the image that you want to add, then paste it to the right of the source tag.

Image titled Write an HTML Page Step 29

Image titled Write an HTML Page Step 30

Enter the image’s dimensions. Type in the image’s width in pixels after «width:», then type in the image’s height in pixels after «height:».

Image titled Write an HTML Page Step 31

Enter the alternate description. This is the text that displays if the image fails to load. To do so, type in alt= and then type in the description.

Image titled Write an HTML Page Step 32

Close the image tag. Place a > bracket after the last character in the alternate description to do so.

Image titled Write an HTML Page Step 33

Fjord

Review your image’s code. It should resemble the following:

Saving the Document on Windows

Image titled Write an HTML Page Step 34

Image titled Write an HTML Page Step 35

Image titled Write an HTML Page Step 36

Image titled Write an HTML Page Step 37

Image titled Write an HTML Page Step 38

Image titled Write an HTML Page Step 39

Image titled Write an HTML Page Step 40

  • You can open the HTML page file in most browsers by clicking and dragging the file onto an open browser window.

Saving the Document on Mac

Image titled Write an HTML Page Step 41

Image titled Write an HTML Page Step 42

Click Preferences… . You’ll find this near the top of the drop-down menu. The Preferences window will open.

Image titled Write an HTML Page Step 43

Image titled Write an HTML Page Step 44

Uncheck the «Add «.txt» extension to plain text files» box. This is below the «When Saving a File» heading.

Image titled Write an HTML Page Step 45

Image titled Write an HTML Page Step 46

Image titled Write an HTML Page Step 47

Image titled Write an HTML Page Step 48

Image titled Write an HTML Page Step 49

Image titled Write an HTML Page Step 50

Image titled Write an HTML Page Step 51

  • You can open the HTML page file in most browsers by clicking and dragging the file onto an open browser window.

Community Q&A

You can write HTML tags between angle brackets and in capital letters. If you want to write an ending HTML tag, put a forward slash between the angle brackets and write the tag after that.

Thanks! We’re glad this was helpful.
Thank you for your feedback.
As a small thank you, we’d like to offer you a $30 gift card (valid at GoNift.com). Use it to try out great new products and services nationwide without paying full price—wine, food delivery, clothing and more. Enjoy! Claim Your Gift If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow

There is only one method, unfortunately. You might be thinking about CSS, but that is a different language, and not HTML.

Thanks! We’re glad this was helpful.
Thank you for your feedback.
As a small thank you, we’d like to offer you a $30 gift card (valid at GoNift.com). Use it to try out great new products and services nationwide without paying full price—wine, food delivery, clothing and more. Enjoy! Claim Your Gift If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow

You can’t do it with HTML. You need to use CSS, a language that you can find many tutorials for on this website.

Thanks! We’re glad this was helpful.
Thank you for your feedback.
As a small thank you, we’d like to offer you a $30 gift card (valid at GoNift.com). Use it to try out great new products and services nationwide without paying full price—wine, food delivery, clothing and more. Enjoy! Claim Your Gift If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission. Support wikiHow

Источник

Читайте также:  Embed html inside html
Оцените статью