If you want to place plain text on a website, you can type it directly using your keyboard in the appropriate content area of the document (see: Document Structure). You don't need to use any additional commands for this. However, keep in mind that web browsers automatically wrap lines, so in the HTML editor, you can enter text as you like, for example:
This is plain text... This is plain text... This is plain text... This is plain text...
You will see the following on the screen:
This is plain text... This is plain text... This is plain text...
In the editor, you can end a line (press Enter) wherever it's convenient for you. You also don't need to split words from one line to another using a hyphen:
This is plain text... This is plain text... This is pla-
You should type the highlighted word normally. The browser will automatically position it in the appropriate line.
Finally, here are a few practical tips that are easy to overlook but are genuinely helpful:
- Maintain proper spelling and style in the text! While typos can happen to anyone, glaring spelling errors, when frequent, can deter potential readers. If you struggle with spelling (like most Poles 🙂), check your text in a computer dictionary (e.g., in Word). Many HTML editors have their dictionaries.
- Use punctuation, especially commas! If you don't use them, the text you write may be completely incomprehensible to readers. Remember to place commas between simple sentences that make up a longer compound sentence (a compound sentence contains several verbs, i.e., words that answer the question, "what does it do?").
Use periods - except at the end of the sentence - also after abbreviations (e.g.: "prof.", "eng."). Additionally, parentheses are often used to provide some side note (dashes can also be used in their place).
- Separate different thematic sections of the text with new paragraphs. Very long "pure" text is not very comfortable to read.
You don't have to become a literary expert right away... unless you're creating a literary website 😉 I don't mean that the text on your site has to be grammatically and orthographically perfect. Let's not get paranoid. This is an HTML course, not a lesson in proper language spelling and writing. Certainly, you'll find errors on this site too - forgive me, I'm not a language language expert. As the famous quote goes:
To err is human... and nothing human is alien to me (you don't know who said that... I don't either 🙂), but even minimal knowledge presented here can be helpful. The important thing is not to drive away visitors with unnecessary errors that can be easily avoided.
If you create your website "anyhow", it may suggest that the information on it is not reliable!
All of this has been a review, but there's something they don't usually teach in school and is essential when working with computer text - these are the rules for entering punctuation marks:
- Basic punctuation marks: period ("."), comma (","), exclamation mark ("!"), question mark ("?"), colon (":"), semicolon (";..."). Spacing is never placed before these marks! A space is added after them.
An exception is when several of these marks occur directly after each other - in that case, a space is added only after the last one.
A second exception applies to short multi-word abbreviations, where each abbreviated word ends with a period - in that case, a space is added only at the end of such an abbreviation (like "e.g." - exempli gratia).
Additionally, dates, times, and numbers should be noted that if there's a slash, comma, or colon within them, no space should be added after it (e.g.: "1410-07-15", "9:08", "12.5").
Also, note that individual periods within an ellipsis should not be separated by spaces, and if a sentence ends with an abbreviation ending with a period, an additional period is not added after it. No spaces should be added after an ellipsis if it starts a new text fragment - to indicate the continuation of some previous statement.Correct: ...word... word. word, word! word? word: word; word... e.g.: tel./fax 1410-07-15, 9:08, etc.
Incorrect: ... word ... word , word ! word,word word :word...word ... word. . . word... . e. g. : tel. / fax 1410- 07- 15 , 9: 08, etc..
- Brackets and quotation marks. The content inside brackets should never be separated from them by spaces (this applies both to the opening and closing brackets)! A space should always be placed before opening brackets. Usually, it is also added after closing brackets. The exception is when a basic punctuation mark appears directly after the bracket - in this case, no space is added between them. This applies to quotation marks as well.
Correct: word (content) word "content" word (content), word "content"! word - (...) - ("content!") "content" (etc.).
Incorrect: word ( content ) word( content )word word( content ) word " content " , word "content" ? -( ... )-"content"( "content! " ) (etc. ) .
- Hyphen (dash) - it should be typed with spaces on both sides. An exception is connectors that are part of compound words (e.g.: "e-mail"), phone numbers, postal codes, etc. - in these cases, they are not separated by spaces.
Correct: This is - as old writings say - correct. 99-999 e-mail
Incorrect: This is- as old writings say-incorrect. 99 - 999 e - mail
- Mathematical operators ("+", "-", "*", "/" "=") are usually typed with spaces on both sides. An exception is the plus and minus signs, which don't indicate a mathematical operation but the sign of a number - in this case, no space is added after them. Additionally, a parenthesis in function names should not be preceded by a space.
Correct: f(x, y) = -2x + 3y + 4
Incorrect: f (x,y)= - 2 x+ 3 y+4
I know that the comments presented here may amuse some of you (especially the first part). Be tolerant of those who are not experienced. Remember if you have ever come across a website that was teeming with annoying errors. What can you think of such a site then? I hope that participants in this course will never have that experience.
Questions and Answers
How to put text on a website?
To add plain text to a website, simply type it in the HTML document's body - that is, within the
<body>...</body> section - using any HTML editor.
How to add text to a page?
To add plain text to an existing web page, open the chosen *.html file in an HTML editor. Then, find the location in the document where the new text should be added - it should be somewhere inside the
<body>...</body> section. You can simply type or paste the text from the system clipboard using the keyboard shortcut Ctrl+V (on Windows). Finally, save the modified *.html file using the keyboard shortcut Ctrl+S.