These classes are generated by WordPress. For instance, if a user inserts an image in his post and says it must be aligned right, WP will generate code like this in the post:
<img class="alignright" src="https://wordpress.stackexchange.com/questions/247130/...">
Now, if your theme doesn’t define the alignright
class, the image won’t be aligned right and the user won’t get what he expects.
You can simply copy these styles from the core and you’ll be fine. But you may also want to adapt things, such as the color of the border around an image caption.
The last two classes are there to help visually impaired people. So, if you’re using a regular screen, nothing will happen. But it’s helping others.
You may also want to read this answer by Chip Bennett on other classes that are generated by WordPress to give you more styling possibilities.
Related Posts:
- How to add CSS class to custom logo?
- How to add custom css file in theme?
- The the_post_thumbnail without srcset?
- Do I actually need to link my theme’s style.css in the theme files
- WordPress API Menu/Submenu Order
- CSS classes for theme
- How To Add New Option Types To Option Tree?
- What WP folder can I use to write files to?
- Are the WordPress Core CSS styles really all nessesary?
- Add a dropdown to theme customizer
- Understanding wp_add_inline_style
- Why I can’t add a CSS style in this WordPress theme?
- Setting multiple default background images?
- How to make a theme with more than one CSS file?
- Best practice way to implement custom sections into a WordPress theme
- Editing the custom background CSS
- How to get gallery images?
- Best practice (forward compatibility) for theme options
- Add a preview to a WordPress Control Panel
- add_image_size is scaling, even though crop is set to true
- How do I get gallery thumbnail URL and change the default thumbnail size?
- CSS in child theme not overriding the parent theme [closed]
- How to highlight the current page in the nav menu?
- Cannot get full thumbnail size using the_post_thumbnail
- Sub folder CSS that’s read by Admin panel
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Is there a way to activate different theme for specified users? [closed]
- Where is definied the theme location for the main menu in a WordPress template?
- Dequeue a style file which is making website load slow!
- How to float an image in Gutenberg
- Set multiple templates per post
- qTranslate with my own theme and settings
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- Theme Loading Into Dashboard
- Can I have two different theme for two different language?
- How to add “Template” option in page attributes panel?
- Single Page Design, Storing in Theme Options
- How to edit my theme for full width?
- Which html elements should be styled in wordpress theme
- Font Awesome 5 Free – far working but fas is not? [closed]
- WordPress Unite Theme: Footer isn’t sticking [closed]
- Following Web Performance Optimization techniques to output static and dynamic css
- How to disable wordpress from overload my stylesheet styles with customizer styles
- How to enqueue javascript for WP Customize options sidebar?
- correct tags for validating input types
- How do I use a color from theme options?
- Custom image size vs CSS sizing
- How can I change the theme of different posts using a plugin?
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Change image size depending on page
- Are seven additional image sizes are too many?
- Having issue with WordPress wp_enqueue_style
- How can I wrap all blog posts image with
- theme style is applied on the dhasboard rather than the website
- Copying the theme style files and images to duplicate the website but with a difference
- Alignment Problem [closed]
- LESS not working in WordPress [closed]
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- How add built-in textarea in theme development?
- Customize Option Framework
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- Some doubts about WordPress handle the horizontal main menu visualization
- Can’t change theme name
- How to use the _S framework
- Change Image Sizes for Mobile Theme
- help needed for suit designing tool
- How to add cropped custom header image?
- Is there a way to serve different resolution images to different devices?
- WordPress Animation Adjustments
- Is there a list of default generated Gutenberg block CSS? Unable to align video blocks
- Why nav_menu_css_class doesn’t work with apply_filters?
- Customizer API Multi Sections in single Panel
- Theme does not allow shortcodes
- What is an alternative to not using child theme to customize a WordPress theme?
- How can I fix my theme header for my CSS stylesheet?
- using themename_the_custom_logo() in template-tags?
- How to generate a rtl.css file for themes?
- Can’t upload images on new theme
- Images use & location, on new wordpress theme
- how can I re-utilize and class on a child theme
- Using Customizer value in an external PHP file inside a theme
- “No Data Received” error in Chrome every time i try to update the theme functions file
- Why the slideshow is not shown in my theme?
- WordPress two sidebar layout or theme
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- Theme automatically inserting “more” tag on every post
- adding navigation to genesis themes
- Custom link color or stylesheets
- Turning WordPress Into full-featured website?
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- TItle In Latest Post is not using H1 Tag [closed]
- Export WordPress theme with modifications for other site
- WordPress 6.4.2 – can’t load editor style css using ‘after_setup_theme’ or ‘admin_init’ actions
- WordPress get_template_part() function not working
- Responsive Images – crop don’t seem to work
- Is accessing theme and using customizer GPL distribution?
- How to get javascript slider to work! [closed]
- loading blank white screen of slide