From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/bg/learn/html/index.html | 67 ++ .../getting_started/index.html | 761 +++++++++++++++++++++ .../bg/learn/html/introduction_to_html/index.html | 81 +++ files/bg/learn/index.html | 96 +++ .../index.html" | 56 ++ .../index.html" | 60 ++ .../index.html" | 219 ++++++ 7 files changed, 1340 insertions(+) create mode 100644 files/bg/learn/html/index.html create mode 100644 files/bg/learn/html/introduction_to_html/getting_started/index.html create mode 100644 files/bg/learn/html/introduction_to_html/index.html create mode 100644 files/bg/learn/index.html create mode 100644 "files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/index.html" create mode 100644 "files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\270\320\275\321\201\321\202\320\260\320\273\320\270\321\200\320\260\320\275\320\265_\320\275\320\260_\320\276\321\201\320\275\320\276\320\262\320\275\320\270\321\217_\321\201\320\276\321\204\321\202\321\203\320\265\321\200/index.html" create mode 100644 "files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\276\321\201\320\275\320\276\320\262\320\270_\320\275\320\260_html/index.html" (limited to 'files/bg/learn') diff --git a/files/bg/learn/html/index.html b/files/bg/learn/html/index.html new file mode 100644 index 0000000000..46508b0e52 --- /dev/null +++ b/files/bg/learn/html/index.html @@ -0,0 +1,67 @@ +--- +title: Structuring the web with HTML +slug: Learn/HTML +tags: + - Beginner + - Guide + - HTML + - Intro + - Learn + - NeedsTranslation + - Topic + - TopicStub +translation_of: Learn/HTML +--- +
{{LearnSidebar}}
+ +

To build websites, you should know about {{Glossary('HTML')}} — the fundamental technology used to define the structure of a webpage. HTML is used to specify whether your web content should be recognized as a paragraph, list, heading, link, image, multimedia player, form, or one of many other available elements or even a new element that you define.

+ +
+

Looking to become a front-end web developer?

+ +

We have put together a course that includes all the essential information you need to work towards your goal.

+ +

Get started

+
+ +

Prerequisites

+ + + +

Before starting this topic, you should have at least basic familiarity with using computers and using the web passively (i.e. just looking at it, consuming the content). You should have a basic work environment set up as detailed in Installing basic software, and understand how to create and manage files, as detailed in Dealing with files — both are parts of our Getting started with the web complete beginner's module.

+ +

It is recommended that you work through Getting started with the web before attempting this topic, however, it isn't absolutely necessary; much of what is covered in the HTML basics article is also covered in our Introduction to HTML module, albeit in a lot more detail.

+ +

After learning HTML, you can then move on to learning about more advanced topics such as:

+ + + +

Modules

+ +

This topic contains the following modules, in a suggested order for working through them. You should definitely start with the first one.

+ +
+
Introduction to HTML
+
This module sets the stage, getting you used to important concepts and syntax, looking at applying HTML to text, how to create hyperlinks, and how to use HTML to structure a webpage.
+
Multimedia and embedding
+
This module explores how to use HTML to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages.
+
HTML tables
+
Representing tabular data on a webpage in an understandable, {{glossary("Accessibility", "accessible")}} way can be a challenge. This module covers basic table markup, along with more complex features such as implementing captions and summaries.
+
+ +

Solving common HTML problems

+ +

Use HTML to solve common problems provides links to sections of content explaining how to use HTML to solve very common problems when creating a webpage: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc.

+ +

See also

+ +
+
Web forms
+
This module provides a series of articles that will help you master the essentials of web forms. Web forms are a very powerful tool for interacting with users — most commonly they are used for collecting data from users, or allowing them to control a user interface. However, for historical and technical reasons it's not always obvious how to use them to their full potential. We'll cover all the essential aspects of Web forms including marking up their HTML structure, styling form controls, validating form data, and submitting data to the server.
+
HTML (HyperText Markup Language)
+
The main entry point for HTML reference documentation on MDN, including detailed element and attribute references — if you want to know what attributes an element has or what values an attribute has, for example, this is a great place to start.
+
diff --git a/files/bg/learn/html/introduction_to_html/getting_started/index.html b/files/bg/learn/html/introduction_to_html/getting_started/index.html new file mode 100644 index 0000000000..14908d59fb --- /dev/null +++ b/files/bg/learn/html/introduction_to_html/getting_started/index.html @@ -0,0 +1,761 @@ +--- +title: Започнете с HTML +slug: Learn/HTML/Introduction_to_HTML/Getting_started +translation_of: Learn/HTML/Introduction_to_HTML/Getting_started +--- +
{{LearnSidebar}}
+ +
{{NextMenu("Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML", "Learn/HTML/Introduction_to_HTML")}}
+ +

Тук ще разгледаме основите на HTML. За начало, тази статия дефинира понятията елемент, атрибути и всички други важни термини, които може да сте чували. Също така обясняваме къде те се вписват в HTML. Ще научите как са струкрурирани HTML елементите, как се изгражда типична HTML страница и други важни езикови характеристики. По пътя ще има възможност и да експериментирате като си поиграете с  HTML!

+ + + + + + + + + + + + +
Необходимо:Основни познания за работа с компютъра, инсталация на основния софтуер, основни познания за  работа с файлове.
Цел:Да придобием основни познания по HTML, и опит с напипсване на няколко HTML елемента.
+ +

Какво е HTML?

+ +

{{glossary("HTML")}} (Hypertext Markup Language) не е програмен език. По-скоро това е език  за маркиране, който казва на web браузърите как да структурират страниците, които посещавате. Може да бъде толкова сложно или опростено, както желае  web разработчика. HTML се състои от последователност от  {{glossary("Element", "elements")}}, които използвате за да обхванете, обвиете или маркирате различни части от съдържанието, за да го накарате да се появява или да се държи по определен начин. Обхващащите тагове {{glossary("Tag", "tags")}} правят съдържанието в хипервръзката да сочи към друга страница, да направи буквите наклонени, и т.н.  За пример следния ред с текст:

+ +
My cat is very grumpy
+ +

Ако искаме да направим този текст самостоятелен като параграф, може да посочим, че това е параграф като го обхванем с   ({{htmlelement("p")}}) елемент за параграф:

+ +
<p>My cat is very grumpy</p>
+ +
+

!: Таговете в HTML не са чувствителни за големина на буквите. Това означава, че могат да бъдат писани с малки и големи букви. Нарп. тага за заглавие {{htmlelement("title")}} може да бъде написан така: <title>, <TITLE>, <Title>, <TiTlE>,  и т.н. и ще работи. Възприето е обаче, таговете да се пишат с малки букви, за цялост, лесно четене на кода и по други причини.

+
+ +

Анатомия на HTML елемента

+ +

Да разгледаме нашия елемент параграф от предния пример:

+ +

+ +

Анатомията на елемента е:

+ + + +

Елемента е отварящият таг, следван от съдържанието, следван от затварящият таг.

+ +

Активност: създаване на вашият първи HTML елемент

+ +

Edit the line below in the Input area by wrapping it with the tags <em> and </em>. To open the element, put the opening tag <em> at the start of the line. To close the element, put the closing tag </em> at the end of the line. Doing this should give the line italic text formatting! See your changes update live in the Output area.

+ +

If you make a mistake, you can clear your work using the Reset button. If you get really stuck, press the Show solution button to see the answer.

+ + + +

{{ EmbedLiveSample('Playable_code', 700, 400, "", "", "hide-codepen-jsfiddle") }}

+ +

Nesting elements

+ +

Elements can be placed within other elements. This is called nesting. If we wanted to state that our cat is very grumpy, we could wrap the word very in a {{htmlelement("strong")}} element, which means that the word is to have strong(er) text formatting:

+ +
<p>My cat is <strong>very</strong> grumpy.</p>
+ +

There is a right and wrong way to do nesting. In the example above, we opened the p element first, then opened the strong element. For proper nesting, we should close the strong element first, before closing the p.

+ +

The following is an example of the wrong way to do nesting:

+ +
<p>My cat is <strong>very grumpy.</p></strong>
+ +

The tags have to open and close in a way that they are inside or outside one another. With the kind of overlap in the example above, the browser has to guess at your intent. This kind of guessing can result in unexpected results.

+ +

Block versus inline elements

+ +

There are two important categories of elements to know in HTML: block-level elements and inline elements.

+ + + +

Consider the following example:

+ +
<em>first</em><em>second</em><em>third</em>
+
+<p>fourth</p><p>fifth</p><p>sixth</p>
+
+ +

{{htmlelement("em")}} is an inline element. As you see below, the first three elements sit on the same line, with no space in between. On the other hand, {{htmlelement("p")}} is a block-level element. Each p element appears on a new line, with space above and below. (The spacing is due to default CSS styling that the browser applies to paragraphs.)

+ +

{{ EmbedLiveSample('Block_versus_inline_elements', 700, 200, "", "") }}

+ +
+

Note: HTML5 redefined the element categories: see Element content categories. While these definitions are more accurate and less ambiguous than their predecessors, the new definitions are a lot more complicated to understand than block and inline. This article will stay with these two terms.

+
+ +
+

Note: The terms block and inline, as used in this article, should not be confused with the types of CSS boxes that have the same names. While the names correlate by default, changing the CSS display type doesn't change the category of the element, and doesn't affect which elements it can contain and which elements it can be contained in. One reason HTML5 dropped these terms was to prevent this rather common confusion.

+
+ +
+

Note: Find useful reference pages that include lists of block and inline elements. See Block-level elements and Inline elements.

+
+ +

Empty elements

+ +

Not all elements follow the pattern of an opening tag, content, and a closing tag. Some elements consist of a single tag, which is typically used to insert/embed something in the document. For example, the {{htmlelement("img")}} element embeds an image file onto a page:

+ +
<img src="https://raw.githubusercontent.com/mdn/beginner-html-site/gh-pages/images/firefox-icon.png">
+ +

This would output the following:

+ +

{{ EmbedLiveSample('Empty_elements', 700, 300, "", "", "hide-codepen-jsfiddle") }}

+ +
+

Note: Empty elements are sometimes called void elements.

+
+ +

Attributes

+ +

Elements can also have attributes. Attributes look like this:

+ +

&amp;amp;amp;amp;amp;amp;lt;p class="editor-note">My cat is very grumpy&amp;amp;amp;amp;amp;amp;lt;/p>

+ +

Attributes contain extra information about the element that won't appear in the content. In this example, the class attribute is an identifying name used to target the element with style information.

+ +

An attribute should have:

+ + + +

Active learning: Adding attributes to an element

+ +

Another example of an element is {{htmlelement("a")}}. This stands for anchor. An anchor can make the text it encloses into a hyperlink. Anchors can take a number of attributes, but several are as follows:

+ + + +

Edit the line below in the Input area to turn it into a link to your favorite website.

+ +
    +
  1. Add the <a> element.
  2. +
  3. Add the href attribute and the title attribute.
  4. +
  5. Specify the target attribute to open the link in the new tab.
  6. +
+ +

You'll be able to see your changes update live in the Output area. You should see a link—that when hovered over—displays the value of the title attribute, and when clicked, navigates to the web address in the href attribute. Remember that you need to include a space between the element name, and between each attribute.

+ +

If you make a mistake, you can always reset it using the Reset button. If you get really stuck, press the Show solution button to see the answer.

+ + + +

{{ EmbedLiveSample('Playable_code2', 700, 400, "", "", "hide-codepen-jsfiddle") }}

+ +

Boolean attributes

+ +

Sometimes you will see attributes written without values. This is entirely acceptable. These are called Boolean attributes. Boolean attributes can only have one value, which is generally the same as the attribute name. For example, consider the {{htmlattrxref("disabled", "input")}} attribute, which you can assign to form input elements. (You use this to disable the form input elements so the user can't make entries. The disabled elements typically have a grayed-out appearance.) For example:

+ +
<input type="text" disabled="disabled">
+ +

As shorthand, it is acceptable to write this as follows:

+ +
<!-- using the disabled attribute prevents the end user from entering text into the input box -->
+<input type="text" disabled>
+
+<!-- text input is allowed, as it doesn't contain the disabled attribute -->
+<input type="text">
+
+ +

For reference, the example above also includes a non-disabled form input element.The HTML from the example above produces this result:

+ +

{{ EmbedLiveSample('Boolean_attributes', 700, 100, "", "", "hide-codepen-jsfiddle") }}

+ +

Omitting quotes around attribute values

+ +

If you look at code for a lot of other sites, you might come across a number of strange markup styles, including attribute values without quotes. This is permitted in certain circumstances, but it can also break your markup in other circumstances. For example, if we revisit our link example from earlier, we could write a basic version with only the href attribute, like this:

+ +
<a href=https://www.mozilla.org/>favorite website</a>
+ +

However, as soon as we add the title attribute in this way, there are problems:

+ +
<a href=https://www.mozilla.org/ title=The Mozilla homepage>favorite website</a>
+ +

As written above, the browser misinterprets the markup, mistaking the title attribute for three attributes:  a title attribute with the value The, and two Boolean attributes, Mozilla and homepage. Obviously, this is not intended! It will cause errors or unexpected behavior, as you can see in the live example below. Try hovering over the link to view the title text!

+ +

{{ EmbedLiveSample('Omitting_quotes_around_attribute_values', 700, 100, "", "", "hide-codepen-jsfiddle") }}

+ +

Always include the attribute quotes. It avoids such problems, and results in more readable code.

+ +

Single or double quotes?

+ +

In this article you will also notice that the attributes are wrapped in double quotes. However, you might see single quotes in some HTML code. This is a matter of style. You can feel free to choose which one you prefer. Both of these lines are equivalent:

+ +
<a href="http://www.example.com">A link to my example.</a>
+
+<a href='http://www.example.com'>A link to my example.</a>
+ +

Make sure you don't mix single quotes and double quotes. This example (below) shows a kind of mixing quotes that will go wrong:

+ +
<a href="http://www.example.com'>A link to my example.</a>
+ +

However, if you use one type of quote, you can include the other type of quote inside your attribute values:

+ +
<a href="http://www.example.com" title="Isn't this fun?">A link to my example.</a>
+ +

To use quote marks inside other quote marks of the same type (single quote or double quote), use HTML entities. For example, this will break:

+ +
<a href='http://www.example.com' title='Isn't this fun?'>A link to my example.</a>
+ +

Instead, you need to do this:

+ +
<a href='http://www.example.com' title='Isn&apos;t this fun?'>A link to my example.</a>
+ +

Anatomy of an HTML document

+ +

Individual HTML elements aren't very useful on their own. Next, let's examine how individual elements combine to form an entire HTML page:

+ +
<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>My test page</title>
+  </head>
+  <body>
+    <p>This is my page</p>
+  </body>
+</html>
+ +

Here we have:

+ +
    +
  1. <!DOCTYPE html>: The doctype. When HTML was young (1991-1992), doctypes were meant to act as links to a set of rules that the HTML page had to follow to be considered good HTML. Doctypes used to look something like this: + +
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    + More recently, the doctype is a historical artifact that needs to be included for everything else to work right. <!DOCTYPE html> is the shortest string of characters that counts as a valid doctype. That is all you need to know!
  2. +
  3. <html></html>: The {{htmlelement("html")}} element. This element wraps all the content on the page. It is sometimes known as the root element.
  4. +
  5. <head></head>: The {{htmlelement("head")}} element. This element acts as a container for everything you want to include on the HTML page, that isn't the content the page will show to viewers. This includes keywords and a page description that would appear in search results, CSS to style content, character set declarations, and more. You'll learn more about this in the next article of the series.
  6. +
  7. <meta charset="utf-8">: This element specifies the character set for your document to UTF-8, which includes most characters from the vast majority of human written languages. With this setting, the page can now handle any textual content it might contain. There is no reason not to set this, and it can help avoid some problems later.
  8. +
  9. <title></title>: The {{htmlelement("title")}} element. This sets the title of the page, which is the title that appears in the browser tab the page is loaded in. The page title is also used to describe the page when it is bookmarked.
  10. +
  11. <body></body>: The {{htmlelement("body")}} element. This contains all the content that displays on the page, including text, images, videos, games, playable audio tracks, or whatever else.
  12. +
+ +

Active learning: Adding some features to an HTML document

+ +

If you want to experiment with writing some HTML on your local computer, you can:

+ +
    +
  1. Copy the HTML page example listed above.
  2. +
  3. Create a new file in your text editor.
  4. +
  5. Paste the code into the new text file.
  6. +
  7. Save the file as index.html.
  8. +
+ +
+

Note: You can also find this basic HTML template on the MDN Learning Area Github repo.

+
+ +

You can now open this file in a web browser to see what the rendered code looks like. Edit the code and refresh the browser to see what the result is. Initially the page looks like this:

+ +

A simple HTML page that says This is my pageIn this exercise, you can edit the code locally on your computer, as described previously, or you can edit it in the sample window below (the editable sample window represents just the contents of the {{htmlelement("body")}} element, in this case). Sharpen your skills by implementing the following tasks:

+ + + +

If you make a mistake, you can always reset it using the Reset button. If you get really stuck, press the Show solution button to see the answer.

+ + + +

{{ EmbedLiveSample('Playable_code3', 700, 600, "", "", "hide-codepen-jsfiddle") }}

+ +

Whitespace in HTML

+ +

In the examples above, you may have noticed that a lot of whitespace is included in the code. This is optional. These two code snippets are equivalent:

+ +
<p>Dogs are silly.</p>
+
+<p>Dogs        are
+         silly.</p>
+ +

No matter how much whitespace you use inside HTML element content (which can include one or more space character, but also line breaks), the HTML parser reduces each sequence of whitespace to a single space when rendering the code. So why use so much whitespace? The answer is readability.
+
+ It can be easier to understand what is going on in your code if you have it nicely formatted. In our HTML we've got each nested element indented by two spaces more than the one it is sitting inside. It is up to you to choose the style of formatting (how many spaces for each level of indentation, for example), but you should consider formatting it.

+ +

Entity references: Including special characters in HTML

+ +

In HTML, the characters <, >,",' and & are special characters. They are parts of the HTML syntax itself. So how do you include one of these special characters in your text? For example, if you want to use an ampersand or less-than sign, and not have it interpreted as code.

+ +

You do this with character references. These are special codes that represent characters, to be used in these exact circumstances. Each character reference starts with an ampersand (&), and ends with a semicolon (;).

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Literal characterCharacter reference equivalent
<&lt;
>&gt;
"&quot;
'&apos;
&&amp;
+ +

The character reference equivalent could be easily remembered because the text it uses can be seen as less than for '&lt;' , quotation for ' &quot; ' and similarly for others. To find more about entity reference, see List of XML and HTML character entity references (Wikipedia).
+
+ In the example below, there are two paragraphs:

+ +
<p>In HTML, you define a paragraph using the <p> element.</p>
+
+<p>In HTML, you define a paragraph using the &lt;p&gt; element.</p>
+ +

In the live output below, you can see that the first paragraph has gone wrong. The browser interprets the second instance of <p> as starting a new paragraph. The second paragraph looks fine because it has angle brackets with character references.

+ +

{{ EmbedLiveSample('Entity_references_Including_special_characters_in_HTML', 700, 200, "", "", "hide-codepen-jsfiddle") }}

+ +
+

Note: You don't need to use entity references for any other symbols, as modern browsers will handle the actual symbols just fine as long, as your HTML's character encoding is set to UTF-8.

+
+ +

HTML comments

+ +

HTML has a mechanism to write comments in the code. Browsers ignore comments,  effectively making comments invisible to the user. The purpose of comments is to allow you to include notes in the code to explain your logic or coding. This is very useful if you return to a code base after being away for long enough that you don't completely remember it. Likewise, comments are invaluable as different people are making changes and updates.

+ +

To write an HTML comment, wrap it in the special markers <!-- and -->. For example:

+ +
<p>I'm not inside a comment</p>
+
+<!-- <p>I am!</p> -->
+ +

As you can see below, only the first paragraph displays in the live output.

+ +

{{ EmbedLiveSample('HTML_comments', 700, 100, "", "", "hide-codepen-jsfiddle") }}

+ +

Summary

+ +

You made it to the end of the article! We hope you enjoyed your tour of the basics of HTML.
+
+ At this point, you should understand what HTML looks like, and how it works at a basic level. You should also be able to write a few elements and attributes. The subsequent articles of this module go further on some of the topics introduced here, as well as presenting other concepts of the language.

+ +
+

Note: As you start to learn more about HTML, consider learning the basics of Cascading Style Sheets, or CSS. CSS is the language used to style web pages. (for example, changing fonts or colors, or altering the page layout) HTML and CSS work well together, as you will soon discover.

+
+ +

Вижте още

+ + + +
{{NextMenu("Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML", "Learn/HTML/Introduction_to_HTML")}}
+ +
+ +

In this module

+ + diff --git a/files/bg/learn/html/introduction_to_html/index.html b/files/bg/learn/html/introduction_to_html/index.html new file mode 100644 index 0000000000..1b35c86467 --- /dev/null +++ b/files/bg/learn/html/introduction_to_html/index.html @@ -0,0 +1,81 @@ +--- +title: Introduction to HTML +slug: Learn/HTML/Introduction_to_HTML +tags: + - CodingScripting + - HTML + - Introduction to HTML + - Landing + - Links + - NeedsTranslation + - Structure + - Text + - TopicStub + - head + - semantics +translation_of: Learn/HTML/Introduction_to_HTML +--- +
{{LearnSidebar}}
+ +

At its heart, {{glossary("HTML")}} is a fairly simple language made up of {{Glossary("Element","elements")}}, which can be applied to pieces of text to give them different meaning in a document (Is it a paragraph? Is it a bulleted list? Is it part of a table?), structure a document into logical sections (Does it have a header? Three columns of content? A navigation menu?), and embed content such as images and videos into a page. This module will introduce the first two of these and introduce fundamental concepts and syntax you need to know to understand HTML.

+ +
+

Looking to become a front-end web developer?

+ +

We have put together a course that includes all the essential information you need to work towards your goal.

+ +

Get started

+
+ +

Prerequisites

+ +

Before starting this module, you don't need any previous HTML knowledge, but you should have at least basic familiarity with using computers and using the web passively (i.e., just looking at it and consuming content). You should have a basic work environment set up (as detailed in Installing basic software), and understand how to create and manage files (as detailed in Dealing with files). Both are parts of our Getting started with the web complete beginner's module.

+ +
+

Note: If you are working on a computer/tablet/other devices that doesn't let you create your own files, you can try out (most of) the code examples in an online coding program such as JSBin or Glitch.

+
+ +

Guides

+ +

This module contains the following articles, which will take you through all the basic theory of HTML and provide ample opportunity for you to test out some skills.

+ +
+
Getting started with HTML
+
Covers the absolute basics of HTML, to get you started — we define elements, attributes, and other important terms, and show where they fit in the language. We also show how a typical HTML page is structured and how an HTML element is structured, and explain other important basic language features. Along the way, we'll play with some HTML to get you interested!
+
What’s in the head? Metadata in HTML
+
The {{Glossary("Head","head")}} of an HTML document is the part that is not displayed in the web browser when the page is loaded. It contains information such as the page {{htmlelement("title")}}, links to {{glossary("CSS")}} (if you want to style your HTML content with CSS), links to custom favicons, and metadata (data about the HTML, such as who wrote it, and important keywords that describe the document).
+
HTML text fundamentals
+
One of HTML's main jobs is to give text meaning (also known as {{Glossary("Semantics","semantics")}}), so that the browser knows how to display it correctly. This article looks at how to use HTML to break up a block of text into a structure of headings and paragraphs, add emphasis/importance to words, create lists, and more.
+
Creating hyperlinks
+
Hyperlinks are really important — they are what makes the web a web. This article shows the syntax required to make a link and discusses best practices for links.
+
Advanced text formatting
+
There are many other elements in HTML for formatting text that we didn't get to in the HTML text fundamentals article. The elements here are less well-known, but still useful to know about. In this article, you'll learn about marking up quotations, description lists, computer code and other related text, subscript and superscript, contact information, and more.
+
Document and website structure
+
As well as defining individual parts of your page (such as "a paragraph" or "an image"), HTML is also used to define areas of your website (such as "the header," "the navigation menu," or "the main content column.") This article looks into how to plan a basic website structure and how to write the HTML to represent this structure.
+
Debugging HTML
+
Writing HTML is fine, but what if something goes wrong, and you can't work out where the error in the code is? This article will introduce you to some tools that can help.
+
+ +

Assessments

+ +

The following assessments will test your understanding of the HTML basics covered in the guides above.

+ +
+
Marking up a letter
+
We all learn to write a letter sooner or later; it is also a useful example to test out text formatting skills. In this assessment, you'll be given a letter to mark up.
+
Structuring a page of content
+
This assessment tests your ability to use HTML to structure a simple page of content, containing a header, a footer, a navigation menu, main content, and a sidebar.
+
+ +

See also

+ +
+
Web literacy basics 1
+
An excellent Mozilla foundation course that explores and tests a lot of the skills talked about in the Introduction to HTML module. Learners get familiar with reading, writing, and participating on the web in this six-part module. Discover the foundations of the web through production and collaboration.
+
+ +
+

Feedback

+ +

Help us improve our guides and tutorials like this one by taking our survey here.

+
diff --git a/files/bg/learn/index.html b/files/bg/learn/index.html new file mode 100644 index 0000000000..699bdabe1b --- /dev/null +++ b/files/bg/learn/index.html @@ -0,0 +1,96 @@ +--- +title: Научете се да програмирате за уеб +slug: Learn +tags: + - Обучение + - мрежа + - начална страница + - начинаещ + - ръководство + - уеб + - указател +translation_of: Learn +--- +
{{LearnSidebar}}
+ +
+

Добре дошли на страниците за самообучение в MDN. Този набор от статии предоставя всичко необходимо на начинаещите уеб-разработчици, за да могат да правят прости сайтове.

+
+ +

Целта на тази част от Мрежата за разработчици на Мозила (МРМ) е не да ви превърне от „начинаещи“ в „експерти“, а да ви даде увереност, така че да се чувствате удобно. Оттук насетне ще можете да намерите пътя докато се учите от МРМ и от други източници за средно напреднали и напреднали. Те предполагат много повече предварително усвоени знания.

+ +

Ако сте напълно начинаещи, програмирането за уеб може да ви се стори като предизвикателство, но не се бойте. Ние ще ви водим за ръчичка и ще обясняваме в подробности, така че да научите нещата както трябва. Чувствайте се като у дома си. Няма значение дали сте студент, изучаващ програмиране за уеб (самостоятелно или заедно с други); учител, търсещ учебни материали; любител или просто някой, който се опитва да разбере как работят уеб-технологиите.

+ +
+

Важно: Съдържанието в областта за обучение се обновява редовно. Ако имате въпроси по теми, които бихте искали да бъдат засегнати или ви се струва, че липсват, вижте раздела {{anch("Връзка с нас")}} долу и се свържете с нас.

+
+ +

Откъде да започнете

+ + + +
+

Забележка: В нашия Речник ще намерите определения на понятията.

+
+ +

{{LearnBox({"title":"Случайно понятие от речника"})}}

+ +

Получаване на изходния код на примерите

+ +

Всички примери от Страниците за Самообучение ще намерите в GitHub. Ако искате да ги свалиете на вашия компютър, най-добре направете следното:

+ +
    +
  1. Инсталирайте Git на компютъра си. Това е системата за контрол на версиите, с която работи GitHub.
  2. +
  3. Създайте си сметка в GitHub. Това е просто и лесно.
  4. +
  5. След регистрацията влезте в github.com като използвате потребителските си име и парола.
  6. +
  7. Отворете командния ред (Windows) или терминал (Linux, MacOSX)
  8. +
  9. За да копирате хранилището с примери в папка с име learning-area в папката, в която се намирате, в терминала изпълнете следната команда: +
    git clone https://github.com/mdn/learning-area
    +
  10. +
  11. Сега влезте в директорията с помощта на файловия браузър или с командата cd.
  12. +
+ +

Можете да обновите местното хранилище learning-area с новите промени, направени в клона master в GitHub, като следвате стъпките:

+ +
    +
  1. Ако се намирате в родителската папка, отидете в learning-area като използвате командата cd: + +
    cd learning-area
    +
  2. +
  3. Обновете хранилището чрез следната команда: +
    git pull
    +
  4. +
+ +

Повече за Гит можете да научите от книгата ProGit.

+ +

Връзка с нас

+ +

Ако искате да се свържете с нас за каквото и да е, най-добре ни пишете в пощенскиите списъци или в IRC-каналите. Съобщавайте ни за всичко, което смятате, че не е в ред или липсва в сайта. Давайте заявки за нови теми за обучение, за помощ за неразбираеми понятия и каквото ви хрумне.

+ +

Ако искате да помогнете с развоя или подобряването на съдържанието, прочетете как можете да помогнете  и ни пишете! Ще се радваме да го обсъдим, независимо дали се обучавате, дали сте учител, опитен уеб-програмист или просто желаете да помогнете с подобрения.

+ +

Вижте също

+ +
+
Codecademy
+
Чудесен интерактивен сайт за изучаване на езици за програмиране от самото начало.
+
Code.org
+
Основи на програмирането – теория и практика. Предназначен предимно за деца и напълно начинаещи.
+
EXLskills 
+
Безплатни и отворени курсове за придобиване на технологични умения, с менторство и базирано на проекти обучение
+
FreeCodeCamp.com
+
Интерактивен сайт с уроци и проекти за изучаване на уеб програмиране.
+
+ +
+
Web Literacy Map
+
Пътеводител в разбирането за световната мрежа и уменията необходими в 21ви век, даващ възможност и за преподаване организирано в различни области.
+
Преподавателски дейности
+
Поредица от дейности по преподаване (и обучение), създадени от Фондация Мозила. Покрива всичко от основни понятия и грамотност за мрежата и сигурността до JavaScript и писане за Minecraft.
+
diff --git "a/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/index.html" "b/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/index.html" new file mode 100644 index 0000000000..874790d34b --- /dev/null +++ "b/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/index.html" @@ -0,0 +1,56 @@ +--- +title: Да започнем с мрежата +slug: Learn/Да_започнем_с_Мрежата +tags: + - CSS + - HTML + - Дизайн + - Показалец + - начинаещ + - ръководство + - теория +translation_of: Learn/Getting_started_with_the_web +--- +
{{LearnSidebar}}
+ +
+

"Да започнем с мрежата" е кратка поредица от статии, която ще ви въведе в разработването на уеб-страници. Ще инсталирате и настроите необходимите ви инструменти за изграждането на една страница и публикуването на програмния код.

+
+ +

Първият ви сайт

+ +

За да се направи професионален сайт е нужна много работа. Затова, ако тепърва се запознавате с програмирането за уеб, ви съветваме да започнете с нещо малко. Няма да измислите Facebook, но пък не е толкова трудно да направите ваш собствен простичък сайт. Ще започнем с това.

+ +

Като следвате съветите в следващите статии подред, ще направите първата си страница. Да започваме!

+ +

Инсталиране на основния софтуер

+ +

Има голям избор от средства за изграждане на уебсайтове. Ако сте начинаещ, лесно ще се объркате от разнообразието на текстови редактори, работни рамки (набори от библиотеки) и средства за тестване. В статията „Инсталиране на основния софтуер" сме изредили основните средства, необходими при разработването на софтуер, работещ в световната мрежа.

+ +

Как ще изглежда Вашият сайт?

+ +

Преди да започнете да пишете кода за сайта, трябва да си съставите план. Какво представяте? Какви цветове и шрифтове използвате. Как ще изглежда сайтът? Следвайте простите препоръки, за да планирате съдържанието и дизайна на сайта.

+ +

Работа с файлове

+ +

Един уебсайт се състои от много файлове: текстово съдържание, код, набори от стилове, медийно съдържание и т.н. Когато правите уебсайт, трябва да съчетаете тези файлове и да изградите от тях структура, чрез която те да могат да комуникират помежду си. Статията за работа с файлове обяснява как да създадем такава структура и за кое да внимаваме при изграждането ѝ.

+ +

Основи на HTML

+ +

HTML (в превод „език за обозначаване на свръх-текст“) е този код, който се използва за структуриране на съдържанието, например да се създаде набор от параграфи, списък с точки, да се вмъкнат изображения или таблици с данни. Оттук можете лесно да се сдобиете с достатъчно сведения, за да се запознаете накратко с HTML: Основи на HTML.

+ +

Основи на CSS

+ +

CSS („набори от стилове") е кодът, който променя външния вид на сайта. Със CSS можете например да зададете цвят на даден текст. Друг пример е това къде на екрана да се показва определено съдържание или какви фонови изображения да бъдат зареждани в уебсайта. За да научите повече, вижте статията основи на CSS.

+ +

Основи на JavaScript

+ +

JavaScript е програмният език, който дава възможност да добавите интерактивност в уебсайта ви, например игри, действия, случващи се когато се натисне бутон, или се въведе информация в дадено поле, динамично зададен CSS, и още доста. Основи на JavaScript ще ви даде идея какво може да правите с този език и как да започнете с писането му.

+ +

Публикуване на Вашия сайт

+ +

След като приключите с писането на код и организирането на файловата ви система, трябва да качите всичко това в Интернет, за да може другите хора също да го намират. За да си изясните как бързо и лесно да постигнете това, вижте нашата статия Публикуване на вашия примерен код.

+ +

Как работи световната мрежа

+ +

Когато посетите любимия си сайт, без дори да подозирате, се случват много неща. „Как работи световната мрежа?" обяснява най-главните.

diff --git "a/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\270\320\275\321\201\321\202\320\260\320\273\320\270\321\200\320\260\320\275\320\265_\320\275\320\260_\320\276\321\201\320\275\320\276\320\262\320\275\320\270\321\217_\321\201\320\276\321\204\321\202\321\203\320\265\321\200/index.html" "b/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\270\320\275\321\201\321\202\320\260\320\273\320\270\321\200\320\260\320\275\320\265_\320\275\320\260_\320\276\321\201\320\275\320\276\320\262\320\275\320\270\321\217_\321\201\320\276\321\204\321\202\321\203\320\265\321\200/index.html" new file mode 100644 index 0000000000..fa82c84655 --- /dev/null +++ "b/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\270\320\275\321\201\321\202\320\260\320\273\320\270\321\200\320\260\320\275\320\265_\320\275\320\260_\320\276\321\201\320\275\320\276\320\262\320\275\320\270\321\217_\321\201\320\276\321\204\321\202\321\203\320\265\321\200/index.html" @@ -0,0 +1,60 @@ +--- +title: Инсталиране на основния софтуер +slug: Learn/Да_започнем_с_Мрежата/Инсталиране_на_основния_софтуер +tags: + - Настройки + - инструменти + - начинаещ + - текстов редактор + - уебчетец +translation_of: Learn/Getting_started_with_the_web/Installing_basic_software +--- +
{{LearnSidebar}}
+ +
{{NextMenu("Learn/Getting_started_with_the_web/What_will_your_website_look_like", "Learn/Getting_started_with_the_web")}}
+ +
+

В статията "Инсталиране на основния софтуер" ви показваме нужните инструменти за уеб-разработка и как да ги инсталирате правилно.

+
+ +

Какви инструменти използват професионалистите?

+ + + +

Какви инструменти ми трябват сега?

+ +

Списъкът изглежда плашещ, но за щастие можете да започнете с уеб разработка без да знаете нищо за повечето от тях. В тази статия ще използваме възможно най-малко от списъка – текстов редактор и някои модерни {{glossary("browser","мрежови четци")}}.

+ +

Инсталиране на текстов редактор

+ +

Най-вероятно вече имате обикновен текстов редактор на компютъра си. Windows по подразбиране има Notepad, а OS X идва с TextEdit. Linux дистрибуциите имат различни редактори, например Ubuntu върви с gedit по подразбиране.

+ +

За Уеб разработка можете да ползвате нещо по-добро от Notepad или TextEdit. Препоръчваме ви да започнете с Brackets - безплатен текстов редактор, който предлага преглед на живо и подсказки при писането на код.

+ +

Инсталиране на модерни уеб браузъри

+ +

Засега ще инсталираме само няколко десктоп Уеб браузъри, в които да тестваме кода си. Изберете операционна система и отворете съответните линкове, за да свалите инсталатори за любимите си браузъри:

+ + + +

Преди да продължите, трябва да инсталирате поне два от тези браузъри и да ги подготвите за тестване на кода.

+ +

Инсталиране на локален уеб сървър

+ +

Някои примери ще трябва да бъдат изпълнени на уеб сървър, за да работят правилно. Можете да видите как да направите това тук: Как се настройва локален сървър за тестване?

+ +

{{NextMenu("Learn/Getting_started_with_the_web/What_will_your_website_look_like", "Learn/Getting_started_with_the_web")}}

diff --git "a/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\276\321\201\320\275\320\276\320\262\320\270_\320\275\320\260_html/index.html" "b/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\276\321\201\320\275\320\276\320\262\320\270_\320\275\320\260_html/index.html" new file mode 100644 index 0000000000..5525426bd7 --- /dev/null +++ "b/files/bg/learn/\320\264\320\260_\320\267\320\260\320\277\320\276\321\207\320\275\320\265\320\274_\321\201_\320\274\321\200\320\265\320\266\320\260\321\202\320\260/\320\276\321\201\320\275\320\276\320\262\320\270_\320\275\320\260_html/index.html" @@ -0,0 +1,219 @@ +--- +title: Основи на HTML +slug: Learn/Да_започнем_с_Мрежата/Основи_на_HTML +tags: + - HTML + - Кодене + - Обучение + - Програмиране + - мрежа + - начинаещ + - уеб +translation_of: Learn/Getting_started_with_the_web/HTML_basics +--- +
{{LearnSidebar}}
+ +
{{PreviousMenuNext("Learn/Да_започнем_с_Мрежата/Dealing_with_files", "Learn/Да_започнем_с_Мрежата/CSS_basics", "Learn/Да_започнем_с_Мрежата")}}
+ +
+

{{Glossary("HTML")}} (Hypertext Markup Language) е кодът, който се използва за построяване и показване на уеб страница и нейното съдържание. Например:  съдържанието може да е построено от няколко параграфа, списък с водещи знаци или като се използват изображения и таблици с данни. Както се вижда от заглавието, тази статия ще ви обясни основните положения на HTML и неговото приложение.

+
+ +

Какво всъщност е HTML?

+ +

HTML не е език за програмиране – той е език за обозначаване, който се използва да укаже на вашия браузър как да изобрази страниците, които посещавате. В зависимост от намеренията на уеб-дизайнера, начинът на изобразяване може да е прост или изключително сложен. HTML представлява поредица от {{Glossary("element", "елементи")}}, които използвате, за да заградите (или обвиете) различни части от съдържанието, за да ги направите да изглеждат и действат по определен начин.  Обграждащите {{Glossary("tag", "тагове")}} могат да направят дума или изображение да действат като препратка към друго място, могат да  изписват думите с курсив, да правят буквите по-големи или по-малки и т.н. Ето примерен ред съдържание:

+ +
Котката ми е много сръдлива
+ +

Ако искаме редът да е изобразен отделно, можем да го означим като параграф като го обградим с таговете за елемента параграф ({{htmlelement("p")}}) :

+ +
<p>Котката ми е много сръдлива</p>
+ +

Анатомията на един HTML елемент

+ +

Нека изследваме елемента p малко по-задълбочено.

+ +

+ +

Основните части на нашият елемент са:

+ +
    +
  1. Отварящ таг(opening tag): Състои се от името на елемента (в този случай, p) заградено от отварящи и затварящи ъглови скоби (angle brackets). Така се обозначава къде е началото на елемента или откъде започва да действа — в този случай показва начало на параграф.
  2. +
  3. Затварящ таг(closing tag): Същият като отварящия таг, но с допълнително включена наклонена черта преди името на елемента. Това показва къде приключва елемента, в този случай — къде е краят на параграфа . Често срещана грешка при начинаещите е да се пропусне затварящия таг, като това може да доведе до странни резултати.
  4. +
  5. Съдържание (content): Това е съдържанието на елемента, което в случая е просто текст.
  6. +
  7. Елемент: Елементът е съвкупността от отварящия таг, затварящия таг и съдържанието.
  8. +
+ +

Елементите могат да имат атрибути, които изглеждат по следния начин:

+ +

+ +

Атрибутите съдържат допълнителни сведения за елемента, които не искате да се появявт в изобразеното съдържание. По-горе, class е името на атрибута, а editor-note е стойността на атрибута. Атрибутът class ви позволява да задавате на елемента идентификатор, чрез който да определяте как изглежда и разни други възможности.

+ +

Един атрибут винаги трябва да има:

+ +
    +
  1. Празно място между него и името на елемента (или предишния атрибут, ако елементът вече има един или повече атрибути).
  2. +
  3. Името на съответния атрибут, последвано от знака за равенство.
  4. +
  5. Отварящи и затварящи кавички обграждащи стойността на атрибута.        
  6. +
+ +

Влагане на елементи

+ +

Възможно е да се постави елемент вътре в друг елемент  — това се нарича влагане (nesting). Ако искахме да  подчертаем, че нашата котка от предишния пример е много сърдита, бихме могли да обгърнем "много" в елемента {{htmlelement("strong")}}. Това означава, че върху думата ще бъде наблегнато:

+ +
<p>Котката ми е <strong>много</strong> сърдита.</p>
+ +

Трябва да се уверите, че елементите ви са правилно вложени: в примера по-горе отваряме елемент първо <p>, след това елементът  <strong>. Следователно първо трябва да затворим елемента <strong> , а след това <p>. Следва пример, показващ неправилна употреба:

+ +
<p>My cat is <strong>very grumpy.</p></strong>
+ +

Елементите трябва да бъдат отваряни и затваряни правилно, за да бъдат наистина вътре или извън един спрямо друг. Ако се препокриват, както в горния пример, тогава браузърът ви ще се опитва да предположи какво сте се опитвали да направите и бихте могли да получите доста неочакван изход. Затова не го правете!

+ +

Празни елементи

+ +

Някои елементи нямат съдържание и се наричат празни елементи (empty elements). Да вземем например елемента {{htmlelement("img")}}, който вече имаме в нашия HTML:

+ +
<img src="images/firefox-icon.png" alt="My test image">
+ +

Той съдържа два атрибута, но няма затварящ таг </img> и съдържание в себе си. Това е защото елементът изображение не обгръща съдържание върху което да действа. Целта му е да прикачи снимка в HTML страницата на мястото, което заема.

+ +

Анатомия на един HTML документ

+ +

Това обхваща основните положения за отделните HTML елементи, но от тях няма особена полза, когато са изполвани поотделно. Нека разгледаме как да съчетаем отделните елемтни, за да образуват цяла страница, написана на HTML. Да погледнем отново кода, който поставихме в нашият пример  index.html (с който първо работихме в статията Работа с файлове):

+ +
<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>My test page</title>
+  </head>
+  <body>
+    <img src="images/firefox-icon.png" alt="My test image">
+  </body>
+</html>
+ +

Ето какво имаме:

+ + + +

Изображения

+ +

Да се върнем отново на нашия елемент  {{htmlelement("img")}}:

+ +
<img src="images/firefox-icon.png" alt="My test image">
+ +

Както споменахме, той вгражда изображение в нашата страница на нястото, където се намира. Изпълнява го чрез атрибута src (source-източник), който указва пътя до файла с изображението.

+ +

Освен това включихме и атрибута alt (alternative-заместващ). Чрез него определяме описателния текст за потребителите, които не могат да видят изображението поради някоя от следните причини:

+ +
    +
  1. Имат зрителни нарушения. Потребители със значително зрително увреждане често обикновено озползват програми, наречени екранни четци, които им изчитат заместващия текст.
  2. +
  3. Поради някаква неизправност изображението не може да бъде показано.  Опитайте да промените пътя в атрибута src, като го направите недействителен. След като запишете и презаредите страницата, вместо изображението би трябвало да виждате следния текст:
  4. +
+ +

+ +

Най-важното за този атрибут е да бъде наистина описателен текст. Това което поставите в него, трябва да предоставя достатъчно сведения на потребителя, така че той да добие добра представа какво показва изображението. В дадения пример "My test image" ("Моето изображение за тест") не е изобщо добро описание. Значително по-подходящ заместващ текст за логото на Firefox би бил "The Firefox logo: a flaming fox surrounding the Earth"("Логото на Firefox: пламтяща лисица обграждаща Земята").

+ +

Опитайте  да измислите по-подходящ заместващ текст за изображението.

+ +
+

Бележка: Разберете повече за достъпността на MDN's Accessibility landing page.

+
+ +

Обозначаване на текст

+ +

Този раздел ще обясни някои от основните елементи в HTML, които ще изпозлвате за маркиране на текст.

+ +

Заглавия

+ +

Елементите за заглавия (heading) ви позволяват да укажете, че определени части от съдържанието са заглавия или подзаглавия. Както една книга има основно заглавие, заглавия на отделните глави и подзаглавия, така и един  HTML документ ги съдържа. HTML поддържа шест нива на заглавия  от {{htmlelement("h1")}} до {{htmlelement("h6")}}, като най-вероятно ще използвате само 3-4 от тях:

+ +
<h1>My main title</h1>
+<h2>My top level heading</h2>
+<h3>My subheading</h3>
+<h4>My sub-subheading</h4>
+ +

Опитайте да поставите подходящо заглавие на вашата страница, което да е над вашия {{htmlelement("img")}} елемент.

+ +

Параграфи

+ +

Както по-горе стана ясно, елементите {{htmlelement("p")}} са предназначени да съдържат отделните параграфи в текста. Ще ги изплозвате често при обозначаването на обикновено текстово съдържание :

+ +
<p>Това е отделен праграф</p>
+ +

Добавете примерния текст (би трябвало да го имате от What should your website look like?) в един или повече параграфи след елемента <img>.

+ +

Списъци

+ +

Доста съдържание в мрежата се представя като списъци и HTML има специални елементи за тях. Списъците съдържат поне два елемента. Най-често срещаните типове са подредени и неподредени  списъци:

+ +
    +
  1. Неподредени списъци (unordered lists) са тези, при които последователността на елементите му е без значение – примерно количка с покупки от сайт-магазин. Те се обграждат от елемента {{htmlelement("ul")}}.
  2. +
  3. Подредени списъци (оrdered lists) са тези, при които подредбата на елементите има значение, както при инструкции в рецепта. Те се обграждат от елемента {{htmlelement("ol")}}.
  4. +
+ +

Всяка точка от списъка се поставя в елемента {{htmlelement("li")}} (точка от списък-list item).

+ +

Примерно, ако искаме да превърнем част от следващия параграф в списък:

+ +
<p>At Mozilla, we’re a global community of technologists, thinkers, and builders working together ... </p>
+ +

Бихме могли да променим обозначаването както следва:

+ +
<p>At Mozilla, we’re a global community of</p>
+
+<ul>
+  <li>technologists</li>
+  <li>thinkers</li>
+  <li>builders</li>
+</ul>
+
+<p>working together ... </p>
+ +

Опитайте да добавите подреден или неподреден списък в примерната си страница.

+ +

Препратки

+ +

Препратките/връзките (links) са изключително важни — те са същността на Мрежата (WEB).  За да добавим препратка използваме този прост елемент — {{htmlelement("a")}}, като a идва от "anchor"-котва . За да превърнете текст от параграфа в препратка, следвайте следните стъпки:

+ +
    +
  1. Изберете си текст. Ние ще изпозлваме "Mozilla Manifesto".
  2. +
  3. Обградете текста с елемент <a> , ето така: +
    <a>Mozilla Manifesto</a>
    +
  4. +
  5. Задайте на елемента <a> атрибут href( съкратено от hypertext reference), както в примера по-долу: +
    <a href="">Mozilla Manifesto</a>
    +
  6. +
  7. Като стойност на този атрибут  поставете уеб-адреса към който искате да води препратката: +
    <a href="https://www.mozilla.org/en-US/about/manifesto/">Mozilla Manifesto</a>
    +
  8. +
+ +

Може да получите неочаквани резултати, ако пропуснете  частта https:// или http:// .Тя се нарича протокол (protocol) и се поставя в началото на уеб-адреса. След като създадете препратката, изпозлвайте я, за да се уверите, че ви препраща точно където искате.

+ +
+

href може да изглежда странно наименование на атрибут. За по-лесно запомняне се подсещайте, че произлиза от  hypertext reference- препратка към свръх-текст.

+
+ +

Сега може да добавите и препратка към вашата страница.

+ +

Заключение

+ +

Ако сте следвали всички наставления в тази статия, би трябвало да имате страница, която изглежда като тази по-долу (можете да я видите и тук.
+
+ A web page screenshot showing a firefox logo, a heading saying mozilla is cool, and two paragraphs of filler text

+ +

Ако много се затрудните, винаги може да сравните работата си с нашия завършен примерен код в Github.

+ +

До тук само бегло споменахме някои основни положения в HTML. За да научите повече, посетете Темата за обучение по HTML.

+ +

{{PreviousMenuNext("Learn/Getting_started_with_the_web/Dealing_with_files", "Learn/Getting_started_with_the_web/CSS_basics", "Learn/Getting_started_with_the_web")}}

-- cgit v1.2.3-54-g00ecf