You are viewing the article How to Create a Simple Website with HTML at Lassho.edu.vn you can quickly access the necessary information in the table of contents of the article below.
This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.
The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.
This article has been viewed 118,678 times.
This is an article on how to create a simple web page with HTML (hypertext markup language). HTML is one of the core components of the World Wide Web and makes up the structure of web pages. After creating a web page, you can save it as HTML text and view it in a web browser. Creating HTML pages is done using a basic text editor on Windows and Mac computers.
Steps
Add headings to HTML
- Windows – Open Start
{“smallUrl”:”https://www.wikihow.com/images_en/0/07/Windowsstart.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/07/ Windowsstart.png/30px-Windowsstart.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output “></div>”}
, type notepad or notepad++ and click Notepad or “Notepad++ or Sublime” at the top of the window.
- macOS – Click Spotlight
{“smallUrl”:”https://www.wikihow.com/images_en/e/ea/Macspotlight.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/e/ea/ Macspotlight.png/30px-Macspotlight.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output” “></div>”}
, type textedit , and double-click TextEdit at the top of the list of results.
- ChromeOS – Open the launcher, then click Text (the icon with the word Code Pad).
<!DOCTYPE html> < html > < head > < title > My Site </ title > </ head >
Add page body and content to HTML
- Add more topics. You can create 6 more headings using the tags from <h1></h1> to <h6></h6> . These tags create headings of different sizes. For example, to create 3 contiguous headings of different sizes, you would write the following command:
< h1 > Welcome to my website! </ h1 > < h2 > I'm Male! </ h2 > < h3 > Hope you enjoy this site! </ h3 >
- Headings express the priority or importance of the content. However, you don’t need to use a high heading if you just want to use a lower heading. You can immediately use the H3 heading, even if the text doesn’t have an H1 heading.
<p> This is my piece of content. </ p >
- You can add multiple lines of content consecutively to create multiple paragraphs under one heading.
- Change the color of the content by placing it in <font cpor="cpor"> and </font> tags. Enter your favorite color in “cpor” (keep the quotes intact). You can change the color of any content (such as headings) using this group of tags. For example, to make a piece of text blue, you would code: <p><font cpor="blue">Whale is a big animal.</font></p>
- You can add bold, italic, and other text formatting using HTML. Here’s an example of how you add text formatting with HTML tags: [3] X Research Sources
< b > Bold </ b > < i > Italic </ i > < u > Underline </ u > < sub > Subscript </ sub > < sup > Superscript </ sup >
- If you use bold and italic fonts for emphasis instead of just styling, use <strong> and <em> tags instead of <b> and <i> . This makes web pages easier to understand when you use technologies such as screen readers [4] X Research Sources or reading modes available in some browsers [5] X Research Sources .
Adding other elements to HTML
- Type <img src= to open the image tag.
- Copy and paste the image path in quotes immediately after the “=”.
- Type > after the image’s path to close the image tag. For example, if the image’s path was “http://www.mypicture.com/lake”, you would write the following code:
< img src = "http://www.mypicture.com/lake.jpg" >
- Type <a href= to open the path tag.
- Copy and paste the URL in quotation marks right after the “=”.
- Type > after the URL to close the HTML URL tag.
- Enter a name for the path right after the closing bracket.
- Type </a> after the path name to close the HTML path. [6] X Research Source The following is an example of a link to Facebook:
<a href = "https://www.facebook.com" > Facebook < / a > . _ _
Color customization
- <body style="background-cpor:lavender;">
- <p style="cpor:midnightblue;">
- The color change only applies to text in the <p> tag. If you want to add a <p> tag underneath with midnightblue , you’ll need to add a style to that tag as well.
- <p style="background-cpor:lightgrey;">
- <h1 style="background-cpor:lightskyblue;">
Close HTML text
<!DOCTYPE html> < html > < head > < title > wikiHow Fan Page </ title > </ head > < body > < h1 > Welcome to my page! </ h1 > < p > This is a wikiHow fan page. Feel free to explore! </ p > < h2 > Important Dates </ h2 > < p >< i > January 15, 2019 </ i > - wikiHow Birthdays </ p > < h2 > Links </ h2 > < p > Here is the link to the wikiHow: < a href = "http://www.wikihow.com" > wikiHow </ a ></ p > </ body > </ html >
Save and open web page
- This step is unnecessary and cannot be performed on Windows.
- Or, you can press Ctrl + S (on Windows) or ⌘ Command + S (on Mac).
- Windows – Click the “Save as type” drop-down box, click All Files , and enter .html after the filename.
- MacOS – Replace .txt after filename with .html .
- ChromeOS – Click the “Save as” button. Enter .html after the filename. You can give the file any name.
- HTML files are usually opened with the default web browser.
- Windows – Right-click the text, select Open with , and click the browser you want to use.
- Mac – Click the text once, click File , choose Open With , and click the browser you want to use.
- On Windows, you can right-click the text and click Edit in the menu that appears (if you have Notepad++ installed, this option will be Edit with Notepad ++).
- On a Mac, you would click to select the text, then click File , choose Open With , and click TextEdit . You can also drag text into TextEdit.
- On your Chromebook, close the Text app, open Files, and find and click your file.
Advice
- Tags should always be closed with the exact same content as the tag’s opening. For example, the
<tag1><tag2>
tag is closed by typing</tag2></tag1>
. - You can add running text to your web page using the
<marquee></marquee>
tag, but some browsers may not recognize it. - Many people use Notepad++ to write and compile code.
- If you want to put the image in the center of the page, you can enter
<class="center">
after the name of the image in the img tag (e.g.<img src="URL" class="center">
).
Warning
- It’s best to save images on Imgur or a similar site if you want to add photos to your site. Posting someone else’s photo may be an act of copyright infringement.
This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.
The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.
This article has been viewed 118,678 times.
This is an article on how to create a simple web page with HTML (hypertext markup language). HTML is one of the core components of the World Wide Web and makes up the structure of web pages. After creating a web page, you can save it as HTML text and view it in a web browser. Creating HTML pages is done using a basic text editor on Windows and Mac computers.
Thank you for reading this post How to Create a Simple Website with HTML at Lassho.edu.vn You can comment, see more related articles below and hope to help you with interesting information.
Related Search: