You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentation for missing HTML formatting tags in C# XML documentation (#47053)
* Initial plan
* Add documentation for missing HTML formatting tags in XML documentation
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/xmldoc/recommended-tags.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,11 @@ The compiler verifies the syntax of the elements followed by a single \* in the
133
133
-[`<c>`](#c)
134
134
-[`<code>`](#code)
135
135
-[`<example>`](#example)\*\*
136
+
-[`<b>`](#b)
137
+
-[`<i>`](#i)
138
+
-[`<u>`](#u)
139
+
-[`<br/>`](#br)
140
+
-[`<a>`](#a)
136
141
-[Reuse documentation text](#reuse-documentation-text) - These tags provide tools that make it easier to reuse XML comments.
137
142
-[`<inheritdoc>`](#inheritdoc)\*\*
138
143
-[`<include>`](#include)\*
@@ -303,6 +308,49 @@ This shows how to increment an integer.
303
308
304
309
The `<example>` tag lets you specify an example of how to use a method or other library member. An example commonly involves using the [\<code>](#code) tag.
305
310
311
+
### \<b>
312
+
313
+
```xml
314
+
<b>text</b>
315
+
```
316
+
317
+
The `<b>` tag is used to make text bold within documentation comments. This HTML formatting tag is validated by the compiler and Visual Studio, and the formatted text appears in IntelliSense and generated documentation.
318
+
319
+
### \<i>
320
+
321
+
```xml
322
+
<i>text</i>
323
+
```
324
+
325
+
The `<i>` tag is used to make text italic within documentation comments. This HTML formatting tag is validated by the compiler and Visual Studio, and the formatted text appears in IntelliSense and generated documentation.
326
+
327
+
### \<u>
328
+
329
+
```xml
330
+
<u>text</u>
331
+
```
332
+
333
+
The `<u>` tag is used to underline text within documentation comments. This HTML formatting tag is validated by the compiler and Visual Studio, and the formatted text appears in IntelliSense and generated documentation.
334
+
335
+
### \<br/>
336
+
337
+
```xml
338
+
Line one<br/>Line two
339
+
```
340
+
341
+
The `<br/>` tag is used to insert a line break within documentation comments. Use this tag when you want a single spaced paragraph, as opposed to the `<para>` tag which creates double spaced paragraphs.
342
+
343
+
### \<a>
344
+
345
+
```xml
346
+
<ahref="https://example.com">Link text</a>
347
+
```
348
+
349
+
The `<a>` tag is used to create hyperlinks within documentation comments. The `href` attribute specifies the URL to link to. This HTML formatting tag is validated by the compiler and Visual Studio.
350
+
351
+
> [!NOTE]
352
+
> The compiler also validates the `<tt>` tag, which is deprecated HTML. Use the [`<c>`](#c) tag instead for inline code formatting.
0 commit comments